]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Rename the Laser cvar, to avoid a functionality conflict
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 348779dba9e124fb3e8d1ef4d77f8fdc80b5d3f7..0f53264255eca962e6fbb86dc02a9cb608f4a25c 100644 (file)
@@ -889,6 +889,23 @@ void PutClientInServer (void)
                        self.nex_charge = autocvar_g_balance_nex_charge_start;
                }
 
+               // all weapons must be fully loaded the first time we pick them up, so set their load to maximum at respawn
+               self.laser_load = autocvar_g_balance_laser_reload_ammo;
+               self.shotgun_load = autocvar_g_balance_shotgun_reload_ammo;
+               self.sniperrifle_load = autocvar_g_balance_sniperrifle_reload_ammo;
+               self.uzi_load = autocvar_g_balance_uzi_reload_ammo;
+               self.grenadelauncher_load = autocvar_g_balance_grenadelauncher_reload_ammo;
+               self.minelayer_load = autocvar_g_balance_minelayer_reload_ammo;
+               self.electro_load = autocvar_g_balance_electro_reload_ammo;
+               self.crylink_load = autocvar_g_balance_crylink_reload_ammo;
+               self.hlac_load = autocvar_g_balance_hlac_reload_ammo;
+               self.fireball_load = autocvar_g_balance_fireball_reload_ammo;
+               self.seeker_load = autocvar_g_balance_fireball_reload_ammo;
+               self.minstanex_load = autocvar_g_balance_minstanex_reload_ammo;
+               self.nex_load = autocvar_g_balance_nex_reload_ammo;
+               self.hagar_load = autocvar_g_balance_hagar_reload_ammo;
+               self.rocketlauncher_load = autocvar_g_balance_rocketlauncher_reload_ammo;
+
                if(inWarmupStage)
                {
                        self.ammo_shells = warmup_start_ammo_shells;
@@ -1065,8 +1082,6 @@ void PutClientInServer (void)
                self.cnt = self.switchweapon;
                self.weapon = 0;
 
-        self.wish_reload = 0;
-
                if(!self.alivetime)
                        self.alivetime = time;
        } else if(self.classname == "observer" || (g_ca && !allowed_to_spawn)) {
@@ -1109,7 +1124,6 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, autocvar_g_balance_nex_secondary); // client has to know if it should zoom or not
        WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_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
-       WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_magazinecapacity); // rifle max bullets
        WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange);
        return TRUE;
 }
@@ -2043,7 +2057,7 @@ void player_powerups (void)
                self.modelflags &~= MF_ROCKET;
        }
 
-       self.effects &~= (EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME | EF_NODEPTHTEST);
+       self.effects &~= (EF_DIMLIGHT | EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME | EF_NODEPTHTEST);
 
        if(!self.modelindex || self.deadflag) // don't apply the flags if the player is gibbed
                return;