X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_client.qc;h=718518231fb6bb9d95d4bc8f471102b35637efcb;hp=691c4930e995978bc50135e3185260b659fd6979;hb=49e5f5d2c7423c3c4536a57e6740d79d9b8eec94;hpb=5d84c659e4c2c51c996b5330fa19c8a24887e42d diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 691c4930e9..718518231f 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; @@ -283,7 +284,7 @@ void FixPlayermodel() if(teamplay) { string s; - s = Team_ColorName_Lower(self.team); + s = Static_Team_ColorName_Lower(self.team); if(s != "neutral") { defaultmodel = cvar_string(strcat("sv_defaultplayermodel_", s)); @@ -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 } @@ -1425,7 +1426,7 @@ void player_powerups (void) // add a way to see what the items were BEFORE all of these checks for the mutator hook olditems = self.items; - if((self.items & IT_USING_JETPACK) && !self.deadflag) + if((self.items & IT_USING_JETPACK) && !self.deadflag && !gameover) self.modelflags |= MF_ROCKET; else self.modelflags &= ~MF_ROCKET; @@ -1991,7 +1992,7 @@ float nJoinAllowed(entity ignore) { float currentlyPlaying = 0; FOR_EACH_REALCLIENT(e) - if(IS_PLAYER(e) || e.caplayer == 1) + if(IS_PLAYER(e) || e.caplayer) currentlyPlaying += 1; if(currentlyPlaying < autocvar_g_maxplayers) @@ -2005,7 +2006,10 @@ float nJoinAllowed(entity ignore) { * g_maxplayers_spectator_blocktime seconds */ void checkSpectatorBlock() { - if(IS_SPEC(self) || IS_OBSERVER(self)) { + if(IS_SPEC(self) || IS_OBSERVER(self)) + if(!self.caplayer) + if(IS_REAL_CLIENT(self)) + { if( time > (self.spectatortime + autocvar_g_maxplayers_spectator_blocktime) ) { Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_QUIT_KICK_SPECTATING); dropclient(self);