From: Mircea Kitsune Date: Fri, 21 Jan 2011 18:14:45 +0000 (+0200) Subject: Another rename X-Git-Tag: xonotic-v0.5.0~309^2~7^2~143 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ec16f2d95ab950e5077d63ab62ce12d5484c9f68;p=xonotic%2Fxonotic-data.pk3dir.git Another rename --- diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 0c3100a45..badc34a85 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -1634,7 +1634,7 @@ float W_ReloadCheck(float ammo_amount) e = get_weaponinfo(self.weapon); // our weapon is fully loaded, no need to reload - if (self.ammo_loaded >= cvar(strcat("g_balance_", e.netname, "_reload_ammo"))) + if (self.clip_load >= cvar(strcat("g_balance_", e.netname, "_reload_ammo"))) return 0; // no ammo, so nothing to load @@ -1647,9 +1647,9 @@ float W_ReloadCheck(float ammo_amount) self.reload_complain = time + 1; } // is there's no more ammo to reload, only switch to another weapon if there's no more load in this one - if(!self.ammo_loaded) + if(!self.clip_load) { - self.ammo_loaded = -1; // reload later + self.clip_load = -1; // reload later W_SwitchToOtherWeapon(self); } return 0; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 56e24ce86..82b53fcad 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -612,9 +612,9 @@ float client_cefc_accumulator; float client_cefc_accumulatortime; #endif -.float ammo_loaded; -.float old_ammo_loaded; -.float ammo_max; +.float clip_load; +.float old_clip_load; +.float clip_size; .float wish_reload; #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 80b861b2f..9888fa5d5 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -818,8 +818,8 @@ void spawnfunc_worldspawn (void) addstat(STAT_FUEL, AS_INT, ammo_fuel); addstat(STAT_SHOTORG, AS_INT, stat_shotorg); addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit); - addstat(STAT_WEAPON_CLIPLOAD, AS_INT, ammo_loaded); - addstat(STAT_WEAPON_CLIPSIZE, AS_INT, ammo_max); + addstat(STAT_WEAPON_CLIPLOAD, AS_INT, clip_load); + addstat(STAT_WEAPON_CLIPSIZE, AS_INT, clip_size); addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup); addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge); diff --git a/qcsrc/server/w_shotgun.qc b/qcsrc/server/w_shotgun.qc index 3d2357e17..4cfd5b4bd 100644 --- a/qcsrc/server/w_shotgun.qc +++ b/qcsrc/server/w_shotgun.qc @@ -7,13 +7,13 @@ REGISTER_WEAPON(SHOTGUN, w_shotgun, IT_SHELLS, 2, WEP_FLAG_NORMAL | WEP_TYPE_HIT void W_Shotgun_SetAmmoCounter() { - // set ammo_loaded to the weapon we have switched to, if the gun uses reloading + // set clip_load to the weapon we have switched to, if the gun uses reloading if(!autocvar_g_balance_shotgun_reload_ammo) - self.ammo_loaded = 0; // also keeps crosshair ammo from displaying + self.clip_load = 0; // also keeps crosshair ammo from displaying else { - self.ammo_loaded = self.shotgun_load; - self.ammo_max = autocvar_g_balance_shotgun_reload_ammo; // for the crosshair ammo display + self.clip_load = self.shotgun_load; + self.clip_size = autocvar_g_balance_shotgun_reload_ammo; // for the crosshair ammo display } } @@ -22,13 +22,13 @@ void W_Shotgun_ReloadedAndReady() float t; // now do the ammo transfer - self.ammo_loaded = self.old_ammo_loaded; // restore the ammo counter, in case we still had ammo in the weapon before reloading - while(self.ammo_loaded < autocvar_g_balance_shotgun_reload_ammo && self.ammo_shells) // make sure we don't add more ammo than we have + self.clip_load = self.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading + while(self.clip_load < autocvar_g_balance_shotgun_reload_ammo && self.ammo_shells) // make sure we don't add more ammo than we have { - self.ammo_loaded += 1; + self.clip_load += 1; self.ammo_shells -= 1; } - self.shotgun_load = self.ammo_loaded; + self.shotgun_load = self.clip_load; t = ATTACK_FINISHED(self) - autocvar_g_balance_shotgun_reload_time - 1; ATTACK_FINISHED(self) = t; @@ -53,8 +53,8 @@ void W_Shotgun_Reload() weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_shotgun_reload_time, W_Shotgun_ReloadedAndReady); - self.old_ammo_loaded = self.ammo_loaded; - self.ammo_loaded = -1; + self.old_clip_load = self.clip_load; + self.clip_load = -1; } void W_Shotgun_Attack (void) @@ -69,7 +69,7 @@ void W_Shotgun_Attack (void) float bulletconstant; local entity flash; - if(autocvar_g_balance_shotgun_reload_ammo && self.ammo_loaded <= 0) + if(autocvar_g_balance_shotgun_reload_ammo && self.clip_load <= 0) return; // reloading, so we are done ammoamount = autocvar_g_balance_shotgun_primary_ammo; @@ -107,8 +107,8 @@ void W_Shotgun_Attack (void) self.ammo_shells -= ammoamount; else { - self.ammo_loaded -= ammoamount; - self.shotgun_load = self.ammo_loaded; + self.clip_load -= ammoamount; + self.shotgun_load = self.clip_load; } } } @@ -176,7 +176,7 @@ float w_shotgun(float req) self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE); else if (req == WR_THINK) { - if(autocvar_g_balance_shotgun_reload_ammo && self.ammo_loaded <= 0) // forced reload + if(autocvar_g_balance_shotgun_reload_ammo && self.clip_load <= 0) // forced reload W_Shotgun_Reload(); else { diff --git a/qcsrc/server/w_sniperrifle.qc b/qcsrc/server/w_sniperrifle.qc index c6ffb02fb..502fd3a53 100644 --- a/qcsrc/server/w_sniperrifle.qc +++ b/qcsrc/server/w_sniperrifle.qc @@ -11,13 +11,13 @@ REGISTER_WEAPON(SNIPERRIFLE, w_sniperrifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_T void W_SniperRifle_SetAmmoCounter() { - // set ammo_loaded to the weapon we have switched to, if the gun uses reloading + // set clip_load to the weapon we have switched to, if the gun uses reloading if(!autocvar_g_balance_sniperrifle_reload_ammo) - self.ammo_loaded = 0; // also keeps crosshair ammo from displaying + self.clip_load = 0; // also keeps crosshair ammo from displaying else { - self.ammo_loaded = self.sniperrifle_load; - self.ammo_max = autocvar_g_balance_sniperrifle_reload_ammo; // for the crosshair ammo display + self.clip_load = self.sniperrifle_load; + self.clip_size = autocvar_g_balance_sniperrifle_reload_ammo; // for the crosshair ammo display } } @@ -26,13 +26,13 @@ void W_SniperRifle_ReloadedAndReady() float t; // now do the ammo transfer - self.ammo_loaded = self.old_ammo_loaded; // restore the ammo counter, in case we still had ammo in the weapon before reloading - while(self.ammo_loaded < autocvar_g_balance_sniperrifle_reload_ammo && self.ammo_nails) // make sure we don't add more ammo than we have + self.clip_load = self.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading + while(self.clip_load < autocvar_g_balance_sniperrifle_reload_ammo && self.ammo_nails) // make sure we don't add more ammo than we have { - self.ammo_loaded += 1; + self.clip_load += 1; self.ammo_nails -= 1; } - self.sniperrifle_load = self.ammo_loaded; + self.sniperrifle_load = self.clip_load; t = ATTACK_FINISHED(self) - autocvar_g_balance_sniperrifle_reload_time - 1; ATTACK_FINISHED(self) = t; @@ -57,8 +57,8 @@ void W_SniperRifle_Reload() weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_sniperrifle_reload_time, W_SniperRifle_ReloadedAndReady); - self.old_ammo_loaded = self.ammo_loaded; - self.ammo_loaded = -1; + self.old_clip_load = self.clip_load; + self.clip_load = -1; } void W_SniperRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant) @@ -92,8 +92,8 @@ void W_SniperRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAdded self.ammo_nails -= pAmmo; else { - self.ammo_loaded -= pAmmo; - self.sniperrifle_load = self.ammo_loaded; + self.clip_load -= pAmmo; + self.sniperrifle_load = self.clip_load; } } } @@ -127,7 +127,7 @@ void W_SniperRifle_BulletHail_Continue() { float r, sw, af; - if(autocvar_g_balance_sniperrifle_reload_ammo && self.ammo_loaded <= 0) + if(autocvar_g_balance_sniperrifle_reload_ammo && self.clip_load <= 0) return; // reloading, so we are done sw = self.switchweapon; // make it not detect weapon changes as reason to abort firing @@ -199,7 +199,7 @@ float w_sniperrifle(float req) } else if (req == WR_THINK) { - if(autocvar_g_balance_sniperrifle_reload_ammo && self.ammo_loaded <= 0) // forced reload + if(autocvar_g_balance_sniperrifle_reload_ammo && self.clip_load <= 0) // forced reload W_SniperRifle_Reload(); else { @@ -278,7 +278,7 @@ float w_sniperrifle(float req) else if (req == WR_RESETPLAYER) { self.sniperrifle_accumulator = time - autocvar_g_balance_sniperrifle_bursttime; - self.ammo_loaded = autocvar_g_balance_sniperrifle_reload_ammo; + self.clip_load = autocvar_g_balance_sniperrifle_reload_ammo; } return TRUE; };