diff --git a/src/server/valve/player.c b/src/server/valve/player.c index 404f9e9d..30a64c23 100644 --- a/src/server/valve/player.c +++ b/src/server/valve/player.c @@ -28,12 +28,20 @@ void Player_Death(int hit) pl.solid = SOLID_NOT; pl.takedamage = DAMAGE_NO; pl.flags &= ~FL_FLASHLIGHT; - pl.health = pl.armor = pl.activeweapon = pl.g_items = 0; + pl.armor = pl.activeweapon = pl.g_items = 0; pl.think = PutClientInServer; pl.nextthink = time + 4.0f; sound(pl, CHAN_AUTO, "fvox/flatline.wav", 1.0, ATTN_NORM); + if (pl.health < -50) { + pl.health = 0; + Effect_GibHuman(pl.origin); + return; + } + + pl.health = 0; + /* Let's handle corpses on the clientside */ entity corpse = spawn(); setorigin(corpse, pl.origin + [0,0,32]);