Reset players hp when needed

Reset players hp when needed
This commit is contained in:
haooy 2025-09-19 17:30:08 +02:00 committed by GitHub
parent 26b4e53946
commit 6dfc2a9175
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2454,7 +2454,7 @@ public void Shavit_OnRestart(int client, int track)
{
SetEntPropFloat(client, Prop_Send, "m_flStamina", 0.0);
if (gCV_RestartWithFullHP.BoolValue)
if (gCV_RestartWithFullHP.BoolValue && GetClientHealth(client) < 100)
{
SetEntityHealth(client, 100);
SetEntProp(client, Prop_Send, "m_ArmorValue", 100);