]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Merge remote branch 'origin/master' into samual/keepaway
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 2a79d6a4add237e2080e9fe345a3bee520dfc328..3d06f58718b22da56d8bb07432bc266df9b81a43 100644 (file)
@@ -599,6 +599,7 @@ void PutObserverInServer (void)
        }
 
        DropAllRunes(self);
+       MUTATOR_CALLHOOK(MakePlayerObserver);
 
        Portal_ClearAll(self);
 
@@ -713,8 +714,6 @@ void PutObserverInServer (void)
        }
        else
                self.frags = FRAGS_SPECTATOR;
-
-       MUTATOR_CALLHOOK(MakePlayerObserver);
 }
 
 float RestrictSkin(float s)
@@ -890,7 +889,11 @@ void PutClientInServer (void)
                self.air_finished = time + 12;
                self.dmg = 2;
                if(cvar("g_balance_nex_charge"))
+               {
+                       if(cvar("g_balance_nex_secondary_charge_pool"))
+                               self.nex_charge_pool_ammo = 1;
                        self.nex_charge = cvar("g_balance_nex_charge_start");
+               }
 
                if(inWarmupStage)
                {
@@ -1075,6 +1078,9 @@ void PutClientInServer (void)
        //      ctf_playerchanged();
 }
 
+.float ebouncefactor, ebouncestop; // electro's values
+// TODO do we need all these fields, or should we stop autodetecting runtime
+// changes and just have a console command to update this?
 float ClientInit_SendEntity(entity to, float sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_INIT);
@@ -1099,6 +1105,8 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay
        WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_bouncefactor
        WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop
+       WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor
+       WriteCoord(MSG_ENTITY, self.ebouncestop); // 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
        WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
@@ -1128,6 +1136,16 @@ void ClientInit_CheckUpdate()
                self.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
                self.SendFlags |= 1;
        }
+       if(self.ebouncefactor != cvar("g_balance_electro_secondary_bouncefactor"))
+       {
+               self.ebouncefactor = cvar("g_balance_electro_secondary_bouncefactor");
+               self.SendFlags |= 1;
+       }
+       if(self.ebouncestop != cvar("g_balance_electro_secondary_bouncestop"))
+       {
+               self.ebouncestop = cvar("g_balance_electro_secondary_bouncestop");
+               self.SendFlags |= 1;
+       }
 }
 
 void ClientInit_Spawn()