diff options
author | Tony J. White <tjw@tjw.org> | 2006-12-04 22:34:20 +0000 |
---|---|---|
committer | Tony J. White <tjw@tjw.org> | 2006-12-04 22:34:20 +0000 |
commit | 9f9385e29ea81cae3da66c5673e1b0a0c64d4744 (patch) | |
tree | 44bdcfe65055bd431f955f4e362c044db3b5ee7f | |
parent | 46aaba1136b501686d6c5b8be56f282bac71e980 (diff) |
* (bug 2934) shut up new warning message on obituary event when killed by world
-rw-r--r-- | src/game/g_combat.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |