From 9f9385e29ea81cae3da66c5673e1b0a0c64d4744 Mon Sep 17 00:00:00 2001 From: "Tony J. White" Date: Mon, 4 Dec 2006 22:34:20 +0000 Subject: * (bug 2934) shut up new warning message on obituary event when killed by world --- src/game/g_combat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/g_combat.c b/src/game/g_combat.c index f457b77e..95d88412 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -443,7 +443,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int ( ( self->client->ps.torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | anim; } - G_AddEvent( self, EV_DEATH1 + i, killer ); + // use own entityid if killed by non-client to prevent uint8_t overflow + G_AddEvent( self, EV_DEATH1 + i, + ( killer < MAX_CLIENTS ) ? killer : self - g_entities ); // globally cycle through the different death animations i = ( i + 1 ) % 3; -- cgit