fix warnings
authorRudolf Polzer <divverent@alientrap.org>
Tue, 19 Oct 2010 13:09:15 +0000 (15:09 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 19 Oct 2010 13:09:15 +0000 (15:09 +0200)
qcsrc/server/cl_physics.qc
qcsrc/server/w_minelayer.qc

index 1d2117defffb0388fe023f9bf4ec7db3fd1ea6c0..b005dd5f3f20c575914e76107a7891ffd4198d07 100644 (file)
@@ -1332,7 +1332,6 @@ void SV_PlayerPhysics()
        {
                // add a maximum of charge_velocity_rate when going fast (f = 1), gradually increasing from minspeed (f = 0) to maxspeed
                xyspeed = min(xyspeed, cvar("g_balance_nex_charge_maxspeed"));
        {
                // add a maximum of charge_velocity_rate when going fast (f = 1), gradually increasing from minspeed (f = 0) to maxspeed
                xyspeed = min(xyspeed, cvar("g_balance_nex_charge_maxspeed"));
-               float f;
                f = (xyspeed - cvar("g_balance_nex_charge_minspeed")) / (cvar("g_balance_nex_charge_maxspeed") - cvar("g_balance_nex_charge_minspeed"));
                // add the extra charge
                self.nex_charge = min(1, self.nex_charge + cvar("g_balance_nex_charge_velocity_rate") * f * frametime);
                f = (xyspeed - cvar("g_balance_nex_charge_minspeed")) / (cvar("g_balance_nex_charge_maxspeed") - cvar("g_balance_nex_charge_minspeed"));
                // add the extra charge
                self.nex_charge = min(1, self.nex_charge + cvar("g_balance_nex_charge_velocity_rate") * f * frametime);
index da847d2709c19de897d57b1610a293537960cc75..8c81d89f72c355c4281510a50f34357da2d4d74c 100644 (file)
@@ -17,7 +17,7 @@ void W_Mine_Stick ()
 
        // in order for mines to face properly when sticking to the ground, they must be a server side entity rather than a csqc projectile
 
 
        // in order for mines to face properly when sticking to the ground, they must be a server side entity rather than a csqc projectile
 
-       local entity newmine;
+       entity newmine;
        newmine = spawn();
        newmine.classname = self.classname;
 
        newmine = spawn();
        newmine.classname = self.classname;
 
@@ -197,8 +197,8 @@ void W_Mine_Damage (entity inflictor, entity attacker, float damage, float death
 
 void W_Mine_Attack (void)
 {
 
 void W_Mine_Attack (void)
 {
-       local entity mine;
-       local entity flash;
+       entity mine;
+       entity flash;
 
        // scan how many mines we placed, and return if we reached our limit
        if(cvar("g_balance_minelayer_limit"))
 
        // scan how many mines we placed, and return if we reached our limit
        if(cvar("g_balance_minelayer_limit"))
@@ -277,9 +277,9 @@ float w_minelayer(float req)
                if(skill >= 2) // skill 0 and 1 bots won't detonate mines!
                {
                        // decide whether to detonate mines
                if(skill >= 2) // skill 0 and 1 bots won't detonate mines!
                {
                        // decide whether to detonate mines
-                       local entity mine, targetlist, targ;
-                       local float edgedamage, coredamage, edgeradius, recipricoledgeradius, d;
-                       local float selfdamage, teamdamage, enemydamage;
+                       entity targetlist, targ;
+                       float edgedamage, coredamage, edgeradius, recipricoledgeradius, d;
+                       float selfdamage, teamdamage, enemydamage;
                        edgedamage = cvar("g_balance_minelayer_edgedamage");
                        coredamage = cvar("g_balance_minelayer_damage");
                        edgeradius = cvar("g_balance_minelayer_radius");
                        edgedamage = cvar("g_balance_minelayer_edgedamage");
                        coredamage = cvar("g_balance_minelayer_damage");
                        edgeradius = cvar("g_balance_minelayer_radius");
@@ -312,7 +312,7 @@ float w_minelayer(float req)
                                }
                                mine = find(mine, classname, "mine");
                        }
                                }
                                mine = find(mine, classname, "mine");
                        }
-                       local float desirabledamage;
+                       float desirabledamage;
                        desirabledamage = enemydamage;
                        if (teamplay != 1 && time > self.invincible_finished && time > self.spawnshieldtime)
                                desirabledamage = desirabledamage - selfdamage * cvar("g_balance_selfdamagepercent");
                        desirabledamage = enemydamage;
                        if (teamplay != 1 && time > self.invincible_finished && time > self.spawnshieldtime)
                                desirabledamage = desirabledamage - selfdamage * cvar("g_balance_selfdamagepercent");
@@ -341,7 +341,7 @@ float w_minelayer(float req)
                                                targ = targ.chain;
                                        }
                                }else{
                                                targ = targ.chain;
                                        }
                                }else{
-                                       local float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000);
+                                       float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000);
                                        //As the distance gets larger, a correct detonation gets near imposible
                                        //Bots are assumed to use the mine spawnfunc_light to see if the mine gets near a player
                                        if(v_forward * normalize(mine.origin - self.enemy.origin)< 0.1)
                                        //As the distance gets larger, a correct detonation gets near imposible
                                        //Bots are assumed to use the mine spawnfunc_light to see if the mine gets near a player
                                        if(v_forward * normalize(mine.origin - self.enemy.origin)< 0.1)