]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
grenade launcher: move bouncefactor to a common cvar for both modes (as it wasn't...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index a5ec05c02fb6b75ac690f03a5b8663076d0e2e4d..b9acee43c235f9b5219c5bcbe443fee1e17bc7c2 100644 (file)
@@ -1091,8 +1091,8 @@ float ClientInit_SendEntity(entity to, float sf)
                WriteString(MSG_ENTITY, "");
        WriteByte(MSG_ENTITY, self.count * 255.0); // g_balance_armor_blockpercent
        WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay
-       WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_secondary_bouncefactor
-       WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_secondary_bouncestop
+       WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_bouncefactor
+       WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop
        WriteByte(MSG_ENTITY, cvar("g_balance_nex_secondary")); // client has to know if it should zoom or not
        WriteByte(MSG_ENTITY, cvar("g_balance_campingrifle_secondary")); // client has to know if it should zoom or not
        return TRUE;
@@ -1111,14 +1111,14 @@ void ClientInit_CheckUpdate()
                self.cnt = cvar("g_balance_weaponswitchdelay");
                self.SendFlags |= 1;
        }
-       if(self.bouncefactor != cvar("g_balance_grenadelauncher_secondary_bouncefactor"))
+       if(self.bouncefactor != cvar("g_balance_grenadelauncher_bouncefactor"))
        {
-               self.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor");
+               self.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
                self.SendFlags |= 1;
        }
-       if(self.bouncestop != cvar("g_balance_grenadelauncher_secondary_bouncestop"))
+       if(self.bouncestop != cvar("g_balance_grenadelauncher_bouncestop"))
        {
-               self.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop");
+               self.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
                self.SendFlags |= 1;
        }
 }
@@ -1305,7 +1305,12 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto
 
 void ClientKill (void)
 {
-       ClientKill_TeamChange(0);
+       if((g_arena || g_ca) && ((champion && champion.classname == "player" && player_count > 1) || player_count == 1)) // don't allow a kill in this case either
+       {
+               // do nothing
+       }
+       else
+               ClientKill_TeamChange(0);
 }
 
 void CTS_ClientKill_Think (void)
@@ -1707,6 +1712,8 @@ void ClientDisconnect (void)
                strunzone(self.netname_previous);
        if(self.clientstatus)
                strunzone(self.clientstatus);
+       if(self.weaponorder_byimpulse)
+               strunzone(self.weaponorder_byimpulse);
 
        ClearPlayerSounds();
 
@@ -2235,6 +2242,7 @@ void SpectateCopy(entity spectatee) {
        self.health = spectatee.health;
        self.impulse = 0;
        self.items = spectatee.items;
+       self.last_pickup = spectatee.last_pickup;
        self.metertime = spectatee.metertime;
        self.strength_finished = spectatee.strength_finished;
        self.invincible_finished = spectatee.invincible_finished;
@@ -2800,6 +2808,11 @@ void PlayerPreThink (void)
                }
 
                player_regen();
+
+               // rot nex charge to the charge limit
+               if(cvar("g_balance_nex_charge_rot_rate") && self.nex_charge > cvar("g_balance_nex_charge_limit"))
+                       self.nex_charge = bound(cvar("g_balance_nex_charge_limit"), self.nex_charge - cvar("g_balance_nex_charge_rot_rate") * frametime / W_TICSPERFRAME, 1);
+
                if(frametime)
                        player_anim();