]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix 2 minor bugs in CA:
authorterencehill <piuntn@gmail.com>
Fri, 24 Jan 2014 10:08:30 +0000 (11:08 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 24 Jan 2014 10:21:29 +0000 (11:21 +0100)
#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

qcsrc/server/cl_client.qc

index 691c4930e995978bc50135e3185260b659fd6979..a60461bcaec7a60bb0b760ecb2bbdecb23a85b54 100644 (file)
@@ -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
 }