case WR_RELOAD:
{
- W_Reload(0, autocvar_g_balance_laser_reload_ammo, autocvar_g_balance_laser_reload_time, "weapons/reload.wav");
+ W_Reload(0, "weapons/reload.wav");
return TRUE;
}
}
case WR_RELOAD:
{
- W_Reload(min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), autocvar_g_balance_crylink_reload_ammo, autocvar_g_balance_crylink_reload_time, "weapons/reload.wav");
+ W_Reload(min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
}
case WR_RELOAD:
{
- W_Reload(WEP_CVAR(devastator, ammo), WEP_CVAR(devastator, reload_ammo), WEP_CVAR(devastator, reload_time), "weapons/reload.wav");
+ W_Reload(WEP_CVAR(devastator, ammo), "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
}
case WR_RELOAD:
{
- W_Reload(min(autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_secondary_ammo), autocvar_g_balance_electro_reload_ammo, autocvar_g_balance_electro_reload_time, "weapons/reload.wav");
+ W_Reload(min(autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_secondary_ammo), "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
case WR_RELOAD:
{
if not(self.hagar_load) // require releasing loaded rockets first
- W_Reload(min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo)), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav");
+ W_Reload(min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo)), "weapons/reload.wav");
return TRUE;
}
}
case WR_RELOAD:
{
- W_Reload(min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo)), autocvar_g_balance_hlac_reload_ammo, autocvar_g_balance_hlac_reload_time, "weapons/reload.wav");
+ W_Reload(min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo)), "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
}
case WR_RELOAD:
{
- entity weapon = get_weaponinfo(WEP_UZI);
- W_Reload(min(max(WEP_CVAR(uzi, sustained_ammo), WEP_CVAR(uzi, first_ammo)), WEP_CVAR(uzi, burst_ammo)), weapon.reloading_ammo, weapon.reloading_time, "weapons/reload.wav");
+ W_Reload(min(max(WEP_CVAR(uzi, sustained_ammo), WEP_CVAR(uzi, first_ammo)), WEP_CVAR(uzi, burst_ammo)), "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
}
case WR_RELOAD:
{
- W_Reload(WEP_CVAR(minelayer, ammo), autocvar_g_balance_minelayer_reload_ammo, autocvar_g_balance_minelayer_reload_time, "weapons/reload.wav");
+ W_Reload(WEP_CVAR(minelayer, ammo), "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
else
used_ammo = minstanex_ammo;
- W_Reload(used_ammo, autocvar_g_balance_minstanex_reload_ammo, autocvar_g_balance_minstanex_reload_time, "weapons/reload.wav");
+ W_Reload(used_ammo, "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
}
case WR_RELOAD:
{
- W_Reload(min(WEP_CVAR_PRI(mortar, ammo), WEP_CVAR_SEC(mortar, ammo)), autocvar_g_balance_mortar_reload_ammo, autocvar_g_balance_mortar_reload_time, "weapons/reload.wav"); // WEAPONTODO
+ W_Reload(min(WEP_CVAR_PRI(mortar, ammo), WEP_CVAR_SEC(mortar, ammo)), "weapons/reload.wav"); // WEAPONTODO
return TRUE;
}
case WR_SUICIDEMESSAGE:
}
case WR_RELOAD:
{
- W_Reload(min(WEP_CVAR_PRI(nex, ammo), WEP_CVAR_SEC(nex, ammo)), autocvar_g_balance_nex_reload_ammo, autocvar_g_balance_nex_reload_time, "weapons/reload.wav");
+ W_Reload(min(WEP_CVAR_PRI(nex, ammo), WEP_CVAR_SEC(nex, ammo)), "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
}
case WR_RELOAD:
{
- W_Reload(min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo)), autocvar_g_balance_rifle_reload_ammo, autocvar_g_balance_rifle_reload_time, "weapons/reload.wav");
+ W_Reload(min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo)), "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
}
case WR_RELOAD:
{
- W_Reload(min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), autocvar_g_balance_seeker_reload_ammo, autocvar_g_balance_seeker_reload_time, "weapons/reload.wav");
+ W_Reload(min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
}
case WR_RELOAD:
{
- W_Reload(autocvar_g_balance_shotgun_primary_ammo, autocvar_g_balance_shotgun_reload_ammo, autocvar_g_balance_shotgun_reload_time, "weapons/reload.wav");
+ W_Reload(autocvar_g_balance_shotgun_primary_ammo, "weapons/reload.wav");
return TRUE;
}
case WR_SUICIDEMESSAGE:
float autocvar_g_balance_armor_rotstable;
float autocvar_g_balance_armor_start;
float autocvar_g_balance_rifle_reload_ammo;
-float autocvar_g_balance_rifle_reload_time;
float autocvar_g_balance_cloaked_alpha;
float autocvar_g_balance_contents_damagerate;
float autocvar_g_balance_contents_drowndelay;
float autocvar_g_balance_contents_projectiledamage;
float autocvar_g_balance_crylink_secondary;
float autocvar_g_balance_crylink_reload_ammo;
-float autocvar_g_balance_crylink_reload_time;
float autocvar_g_balance_damagepush_speedfactor;
float autocvar_g_balance_electro_combo_comboradius;
float autocvar_g_balance_electro_combo_damage;
float autocvar_g_balance_electro_secondary_refire2;
float autocvar_g_balance_electro_secondary_speed;
float autocvar_g_balance_electro_reload_ammo;
-float autocvar_g_balance_electro_reload_time;
float autocvar_g_balance_falldamage_deadminspeed;
float autocvar_g_balance_falldamage_factor;
float autocvar_g_balance_falldamage_maxdamage;
float autocvar_g_balance_grapplehook_stretch;
float autocvar_g_balance_grapplehook_damagedbycontents;
float autocvar_g_balance_hagar_reload_ammo;
-float autocvar_g_balance_hagar_reload_time;
float autocvar_g_balance_health_limit;
float autocvar_g_balance_health_regen;
float autocvar_g_balance_health_regenlinear;
float autocvar_g_balance_health_rotstable;
float autocvar_g_balance_health_start;
float autocvar_g_balance_hlac_reload_ammo;
-float autocvar_g_balance_hlac_reload_time;
float autocvar_g_balance_keyhunt_damageforcescale;
float autocvar_g_balance_keyhunt_delay_collect;
float autocvar_g_balance_keyhunt_delay_return;
float autocvar_g_balance_laser_primary_speed;
//float autocvar_g_balance_laser_primary_spread;
float autocvar_g_balance_laser_reload_ammo;
-float autocvar_g_balance_laser_reload_time;
float autocvar_g_balance_laser_secondary;
float autocvar_g_balance_laser_secondary_animtime;
float autocvar_g_balance_laser_secondary_damage;
float autocvar_g_balance_laser_shockwave_spread_max;
float autocvar_g_balance_laser_shockwave_spread_min;
float autocvar_g_balance_minelayer_reload_ammo;
-float autocvar_g_balance_minelayer_reload_time;
float autocvar_g_balance_minstanex_ammo;
float autocvar_g_balance_minstanex_laser_ammo;
float autocvar_g_balance_minstanex_laser_animtime;
float autocvar_g_balance_minstanex_animtime;
float autocvar_g_balance_minstanex_refire;
float autocvar_g_balance_minstanex_reload_ammo;
-float autocvar_g_balance_minstanex_reload_time;
float autocvar_g_balance_nex_reload_ammo;
-float autocvar_g_balance_nex_reload_time;
float autocvar_g_balance_nexball_primary_animtime;
float autocvar_g_balance_nexball_primary_refire;
float autocvar_g_balance_nexball_primary_speed;
float autocvar_g_balance_powerup_strength_time;
float autocvar_g_balance_superweapons_time;
float autocvar_g_balance_seeker_reload_ammo;
-float autocvar_g_balance_seeker_reload_time;
float autocvar_g_balance_selfdamagepercent;
float autocvar_g_balance_shotgun_primary_ammo;
float autocvar_g_balance_shotgun_primary_animtime;
float autocvar_g_balance_shotgun_secondary_melee_multihit;
float autocvar_g_balance_shotgun_secondary_refire;
float autocvar_g_balance_shotgun_reload_ammo;
-float autocvar_g_balance_shotgun_reload_time;
float autocvar_g_balance_teams;
float autocvar_g_balance_teams_prevent_imbalance;
float autocvar_g_balance_teams_scorefactor;
float autocvar_g_balance_uzi_reload_ammo;
-float autocvar_g_balance_uzi_reload_time;
float autocvar_g_ballistics_density_corpse;
float autocvar_g_ballistics_density_player;
float autocvar_g_ballistics_materialconstant;
w_ready();
}
-void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, string sent_sound)
+void W_Reload(float sent_ammo_min, string sent_sound)
{
// set global values to work with
+ entity e;
+ e = get_weaponinfo(self.weapon);
self.reload_ammo_min = sent_ammo_min;
- self.reload_ammo_amount = sent_ammo_amount;
- self.reload_time = sent_time;
+ self.reload_ammo_amount = e.reloading_ammo;;
+ self.reload_time = e.reloading_time;
self.reload_sound = sent_sound;
- // check if we meet the necessary conditions to reload
-
- entity e;
- e = get_weaponinfo(self.weapon);
-
// don't reload weapons that don't have the RELOADABLE flag
if not(e.spawnflags & WEP_FLAG_RELOADABLE)
{
// now begin the reloading process
- sound (self, CH_WEAPON_SINGLE, self.reload_sound, VOL_BASE, ATTN_NORM);
+ sound(self, CH_WEAPON_SINGLE, self.reload_sound, VOL_BASE, ATTN_NORM);
// do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon,
// then quickly switch to another weapon and back. Reloading is canceled, but the reload delay is still there,