From: terencehill Date: Fri, 24 Jan 2014 10:08:30 +0000 (+0100) Subject: Fix 2 minor bugs in CA: X-Git-Tag: xonotic-v0.8.0~126^2~28 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d29393b664919d570bb6b6c9687bb416a69cda26;p=xonotic%2Fxonotic-data.pk3dir.git Fix 2 minor bugs in CA: #1 join the game, kill yourself, spectate with F3, join next round and you'll see gibs coming out from the spectator camera point of view #2 join the game, spectate with F3, join next round and you'll see the error "Obituary called on non-player?!" in the console --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 691c4930e..a60461bca 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -265,6 +265,7 @@ void PutObserverInServer (void) self.punchvector = '0 0 0'; self.oldvelocity = self.velocity; self.fire_endtime = -1; + self.event_damage = func_null; } .float model_randomizer; @@ -786,8 +787,8 @@ void ClientKill_Now() if(self.killindicator_teamchange) ClientKill_Now_TeamChange(); - // in any case: - Damage(self, self, self, 100000, DEATH_KILL, self.origin, '0 0 0'); + if(IS_PLAYER(self)) + Damage(self, self, self, 100000, DEATH_KILL, self.origin, '0 0 0'); // now I am sure the player IS dead }