change KnockbackOnClientHurt to KnockbackOnTakeDamageAlivePost

This commit is contained in:
2019-09-27 16:40:58 +02:00
parent d75e123e35
commit dfc024b3d8
8 changed files with 123 additions and 37 deletions

View File

@ -285,7 +285,8 @@ InfectOnClientSpawn(client)
CS_RespawnPlayer(client);
}
InfectUnglitchKevlar(client);
// Unglitch kevlar, set last hitgroup to HITGROUP_GENERIC
ToolsSetClientLastHitGroup(client, HITGROUP_GENERIC);
// Forward event to modules.
ZSpawnOnClientSpawn(client);
@ -899,7 +900,8 @@ InfectZombieToHuman(client, bool:respawn = false, bool:protect = false)
SpawnProtectStart(client);
}
InfectUnglitchKevlar(client);
// Unglitch kevlar, set last hitgroup to HITGROUP_GENERIC
ToolsSetClientLastHitGroup(client, HITGROUP_GENERIC);
// Forward event to modules.
SEffectsOnClientHuman(client);
@ -1536,14 +1538,3 @@ InfectMode:InfectGetModeOrFail()
return mode;
}
InfectUnglitchKevlar(client)
{
// Unglitch kevlar. (Reset hitbox to HITBOX_GENERIC)
// Example: You get hit in the head by a bullet as a zombie
// the round ends, you spawn as a human.
// You get damaged by a trigger, the game still thinks you
// are getting damaged in the head hitgroup, >mfw source engine.
// Thanks to leaked 2007 Source Engine Code.
SetEntData(client, 4444, 0, 4);
}