]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Don't bother checking for CTS specifically if the re-spawn is intended to be silent
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index ffd380810fec393f7607ea8615ee83a3fd6e268e..97fcfcad4b70af2500c29b595ca2156ae0f15871 100644 (file)
@@ -354,6 +354,15 @@ void PutObserverInServer(entity this)
        this.oldvelocity = this.velocity;
        this.fire_endtime = -1;
        this.event_damage = func_null;
+
+       for(int slot = 0; slot < MAX_AXH; ++slot)
+       {
+               entity axh = this.(AuxiliaryXhair[slot]);
+               this.(AuxiliaryXhair[slot]) = NULL;
+
+               if(axh.owner == this && axh != NULL && !wasfreed(axh))
+                       delete(axh);
+       }
 }
 
 int player_getspecies(entity this)
@@ -655,7 +664,7 @@ void PutClientInServer(entity this)
                        .entity weaponentity = weaponentities[slot];
                        entity oldwep = this.(weaponentity);
                        CL_SpawnWeaponentity(this, weaponentity);
-                       if(oldwep)
+                       if(oldwep && oldwep.owner == this)
                                this.(weaponentity).m_gunalign = oldwep.m_gunalign;
                }
                this.alpha = default_player_alpha;
@@ -892,7 +901,7 @@ void KillIndicator_Think(entity this)
                ClientKill_Now(this.owner);
                return;
        }
-    else if(g_cts && this.health == 1) // health == 1 means that it's silent
+    else if(this.health == 1) // health == 1 means that it's silent
     {
         this.nextthink = time + 1;
         this.cnt -= 1;
@@ -922,11 +931,9 @@ void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change,
 
        killtime = autocvar_g_balance_kill_delay;
 
-       if(g_race_qualifying || g_cts)
-               killtime = 0;
-
     if(MUTATOR_CALLHOOK(ClientKill, this, killtime))
        return;
+    killtime = M_ARGV(1, float);
 
        this.killindicator_teamchange = targetteam;
 
@@ -1205,7 +1212,7 @@ void ClientConnect(entity this)
                stuffcmd(this, strcat("\nfog ", world.fog, "\nr_fog_exp2 0\nr_drawfog 1\n"));
 
        if (autocvar_sv_teamnagger && !(autocvar_bot_vs_human && AvailableTeams() == 2))
-               if (!g_ca && !g_cts && !g_race) // teamnagger is currently bad for ca, race & cts
+               if(!MUTATOR_CALLHOOK(HideTeamNagger, this))
                        send_CSQC_teamnagger();
 
        CSQCMODEL_AUTOINIT(this);
@@ -1705,6 +1712,11 @@ void SpectateCopy(entity this, entity spectatee)
                this.(weaponentity) = spectatee.(weaponentity);
        }
 
+       for(int slot = 0; slot < MAX_AXH; ++slot)
+       {
+               this.(AuxiliaryXhair[slot]) = spectatee.(AuxiliaryXhair[slot]);
+       }
+
     anticheat_spectatecopy(this, spectatee);
        this.hud = spectatee.hud;
        if(spectatee.vehicle)
@@ -2334,6 +2346,7 @@ void PlayerPreThink (entity this)
                CheckRules_Player(this);
 
                if (game_stopped || intermission_running) {
+                       this.modelflags &= ~MF_ROCKET;
                        if(intermission_running)
                                IntermissionThink(this);
                        return;