From: Rudolf Polzer Date: Fri, 20 Jan 2012 21:06:45 +0000 (+0100) Subject: fireball: don't use ammo any more X-Git-Tag: xonotic-v0.6.0~104^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2cb25c40e6e25b258a3db8afa9fbfce1fd3e235b;p=xonotic%2Fxonotic-data.pk3dir.git fireball: don't use ammo any more --- diff --git a/balance25.cfg b/balance25.cfg index cd770d72e..420020622 100644 --- a/balance25.cfg +++ b/balance25.cfg @@ -741,7 +741,6 @@ set g_balance_tuba_force 40 set g_balance_tuba_pitchstep 6 // }}} // {{{ fireball -set g_balance_fireball_primary_ammo 40 set g_balance_fireball_primary_animtime 0.15 set g_balance_fireball_primary_bfgdamage 100 set g_balance_fireball_primary_bfgforce 0 @@ -761,7 +760,6 @@ set g_balance_fireball_primary_refire 5 set g_balance_fireball_primary_refire2 0 set g_balance_fireball_primary_speed 650 set g_balance_fireball_primary_spread 0 -set g_balance_fireball_secondary_ammo 5 set g_balance_fireball_secondary_animtime 0.3 set g_balance_fireball_secondary_damage 40 set g_balance_fireball_secondary_damageforcescale 4 @@ -777,8 +775,6 @@ set g_balance_fireball_secondary_speed 900 set g_balance_fireball_secondary_speed_up 100 set g_balance_fireball_secondary_speed_z 0 set g_balance_fireball_secondary_spread 0 -set g_balance_fireball_reload_ammo 0 //default: 60 -set g_balance_fireball_reload_time 2 // }}} // {{{ seeker set g_balance_seeker_type 0 // 0 = old seeker, 1 = new seeker. THIS IS A TEMPORARY CVAR FOR TESTING, will be removed later. diff --git a/balanceFruitieX.cfg b/balanceFruitieX.cfg index 221894627..221f725a5 100644 --- a/balanceFruitieX.cfg +++ b/balanceFruitieX.cfg @@ -741,7 +741,6 @@ set g_balance_tuba_force 40 set g_balance_tuba_pitchstep 6 // }}} // {{{ fireball -set g_balance_fireball_primary_ammo 40 set g_balance_fireball_primary_animtime 0.2 set g_balance_fireball_primary_bfgdamage 100 set g_balance_fireball_primary_bfgforce 0 @@ -761,7 +760,6 @@ set g_balance_fireball_primary_refire 5 set g_balance_fireball_primary_refire2 0 set g_balance_fireball_primary_speed 650 set g_balance_fireball_primary_spread 0 -set g_balance_fireball_secondary_ammo 5 set g_balance_fireball_secondary_animtime 0.2 set g_balance_fireball_secondary_damage 40 set g_balance_fireball_secondary_damageforcescale 4 @@ -777,8 +775,6 @@ set g_balance_fireball_secondary_speed 900 set g_balance_fireball_secondary_speed_up 100 set g_balance_fireball_secondary_speed_z 0 set g_balance_fireball_secondary_spread 0 -set g_balance_fireball_reload_ammo 0 //default: 60 -set g_balance_fireball_reload_time 2 // }}} // {{{ seeker set g_balance_seeker_type 0 // 0 = old seeker, 1 = new seeker. THIS IS A TEMPORARY CVAR FOR TESTING, will be removed later. diff --git a/balanceXPM.cfg b/balanceXPM.cfg index 001e1d2dc..a358d9ea6 100644 --- a/balanceXPM.cfg +++ b/balanceXPM.cfg @@ -741,7 +741,6 @@ set g_balance_tuba_force 40 set g_balance_tuba_pitchstep 6 // }}} // {{{ fireball // this is a superweapon -- lets make it behave as one. -set g_balance_fireball_primary_ammo 20 set g_balance_fireball_primary_animtime 0.2 set g_balance_fireball_primary_bfgdamage 100 set g_balance_fireball_primary_bfgforce 0 @@ -761,7 +760,6 @@ set g_balance_fireball_primary_refire 2 set g_balance_fireball_primary_refire2 0 set g_balance_fireball_primary_speed 1200 set g_balance_fireball_primary_spread 0 -set g_balance_fireball_secondary_ammo 5 set g_balance_fireball_secondary_animtime 0.3 set g_balance_fireball_secondary_damage 40 set g_balance_fireball_secondary_damageforcescale 4 @@ -777,8 +775,6 @@ set g_balance_fireball_secondary_speed 900 set g_balance_fireball_secondary_speed_up 100 set g_balance_fireball_secondary_speed_z 0 set g_balance_fireball_secondary_spread 0 -set g_balance_fireball_reload_ammo 0 //default: 100 -set g_balance_fireball_reload_time 2 // }}} // {{{ seeker set g_balance_seeker_type 1 // 0 = old seeker, 1 = new seeker. THIS IS A TEMPORARY CVAR FOR TESTING, will be removed later. diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index 24adbdc31..b351d22c6 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -741,7 +741,6 @@ set g_balance_tuba_force 40 set g_balance_tuba_pitchstep 6 // }}} // {{{ fireball // this is a superweapon -- lets make it behave as one. -set g_balance_fireball_primary_ammo 20 set g_balance_fireball_primary_animtime 0.2 set g_balance_fireball_primary_bfgdamage 100 set g_balance_fireball_primary_bfgforce 0 @@ -761,7 +760,6 @@ set g_balance_fireball_primary_refire 2 set g_balance_fireball_primary_refire2 0 set g_balance_fireball_primary_speed 1200 set g_balance_fireball_primary_spread 0 -set g_balance_fireball_secondary_ammo 5 set g_balance_fireball_secondary_animtime 0.3 set g_balance_fireball_secondary_damage 40 set g_balance_fireball_secondary_damageforcescale 4 @@ -777,8 +775,6 @@ set g_balance_fireball_secondary_speed 900 set g_balance_fireball_secondary_speed_up 100 set g_balance_fireball_secondary_speed_z 0 set g_balance_fireball_secondary_spread 0 -set g_balance_fireball_reload_ammo 0 //default: 100 -set g_balance_fireball_reload_time 2 // }}} // {{{ seeker set g_balance_seeker_type 1 // 0 = old seeker, 1 = new seeker. THIS IS A TEMPORARY CVAR FOR TESTING, will be removed later. diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index bf361d088..e336efc53 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -236,7 +236,6 @@ float autocvar_g_balance_falldamage_deadminspeed; float autocvar_g_balance_falldamage_factor; float autocvar_g_balance_falldamage_maxdamage; float autocvar_g_balance_falldamage_minspeed; -float autocvar_g_balance_fireball_primary_ammo; float autocvar_g_balance_fireball_primary_animtime; float autocvar_g_balance_fireball_primary_bfgdamage; float autocvar_g_balance_fireball_primary_bfgforce; @@ -255,7 +254,6 @@ float autocvar_g_balance_fireball_primary_radius; float autocvar_g_balance_fireball_primary_refire; float autocvar_g_balance_fireball_primary_refire2; float autocvar_g_balance_fireball_primary_speed; -float autocvar_g_balance_fireball_secondary_ammo; float autocvar_g_balance_fireball_secondary_animtime; float autocvar_g_balance_fireball_secondary_damage; float autocvar_g_balance_fireball_secondary_damageforcescale; @@ -268,8 +266,6 @@ float autocvar_g_balance_fireball_secondary_lifetime; float autocvar_g_balance_fireball_secondary_refire; float autocvar_g_balance_fireball_secondary_speed; float autocvar_g_balance_fireball_secondary_speed_up; -float autocvar_g_balance_fireball_reload_ammo; -float autocvar_g_balance_fireball_reload_time; float autocvar_g_balance_firetransfer_damage; float autocvar_g_balance_firetransfer_time; float autocvar_g_balance_fuel_limit; diff --git a/qcsrc/server/w_fireball.qc b/qcsrc/server/w_fireball.qc index 02463c2c0..4f119c326 100644 --- a/qcsrc/server/w_fireball.qc +++ b/qcsrc/server/w_fireball.qc @@ -1,5 +1,5 @@ #ifdef REGISTER_WEAPON -REGISTER_WEAPON(FIREBALL, w_fireball, IT_FUEL, 9, WEP_FLAG_RELOADABLE | WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "fireball", "fireball", _("Fireball")); +REGISTER_WEAPON(FIREBALL, w_fireball, 0, 9, WEP_FLAG_RELOADABLE | WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "fireball", "fireball", _("Fireball")); #else #ifdef SVQC .float bot_primary_fireballmooth; // whatever a mooth is @@ -198,8 +198,6 @@ void W_Fireball_Attack1_Frame1() void W_Fireball_Attack1_Frame0() { - W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_fireball_primary_ammo, autocvar_g_balance_fireball_reload_ammo); - W_Fireball_AttackEffect(0, '-1.25 -3.75 0'); sound (self, CH_WEAPON_SINGLE, "weapons/fireball_prefire2.wav", VOL_BASE, ATTN_NORM); weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_fireball_primary_animtime, W_Fireball_Attack1_Frame1); @@ -249,8 +247,6 @@ void W_Fireball_Attack2() vector f_diff; float c; - W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_fireball_secondary_ammo, autocvar_g_balance_fireball_reload_ammo); - c = mod(self.bulletcounter, 4); switch(c) { @@ -364,32 +360,20 @@ float w_fireball(float req) else if (req == WR_SETUP) { weapon_setup(WEP_FIREBALL); - self.current_ammo = ammo_fuel; + self.current_ammo = ammo_none; } else if (req == WR_CHECKAMMO1) { - ammo_amount = self.ammo_fuel >= autocvar_g_balance_fireball_primary_ammo; - ammo_amount += self.(weapon_load[WEP_FIREBALL]) >= autocvar_g_balance_fireball_primary_ammo; - return ammo_amount; + return 1; } else if (req == WR_CHECKAMMO2) { - ammo_amount = self.ammo_fuel >= autocvar_g_balance_fireball_secondary_ammo; - ammo_amount += self.(weapon_load[WEP_FIREBALL]) >= autocvar_g_balance_fireball_secondary_ammo; - return ammo_amount; + return 1; } else if (req == WR_RESETPLAYER) { self.fireball_primarytime = time; } - else if (req == WR_RELOAD) - { - // fuel can be a non-whole number, which brakes stuff here when between 0 and 1 - if(self.ammo_fuel < 1) - self.ammo_fuel = 0; - - W_Reload(min(autocvar_g_balance_fireball_primary_ammo, autocvar_g_balance_fireball_secondary_ammo), autocvar_g_balance_fireball_reload_ammo, autocvar_g_balance_fireball_reload_time, "weapons/reload.wav"); - } return TRUE; } #endif