// reset fields the weapons may use
for (j = WEP_FIRST; j <= WEP_LAST; ++j)
+ {
weapon_action(j, WR_RESETPLAYER);
+ // all weapons must be fully loaded when we spawn
+ entity e;
+ e = get_weaponinfo(j);
+ self.weapon_load[j] = cvar(strcat("g_balance_", e.netname, "_reload_ammo"));
+ }
+
oldself = self;
self = spot;
activator = oldself;
ammo_amount += self.weapon_load[WEP_CRYLINK] >= autocvar_g_balance_crylink_secondary_ammo;
return ammo_amount;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_CRYLINK] = autocvar_g_balance_crylink_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_Crylink_Reload();
else if (req == WR_RESETPLAYER)
{
self.electro_secondarytime = time;
-
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_ELECTRO] = autocvar_g_balance_electro_reload_ammo;
}
else if (req == WR_RELOAD)
{
else if (req == WR_RESETPLAYER)
{
self.fireball_primarytime = time;
-
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_FIREBALL] = autocvar_g_balance_fireball_reload_ammo;
}
else if (req == WR_RELOAD)
{
ammo_amount += self.weapon_load[WEP_GRENADE_LAUNCHER] >= autocvar_g_balance_grenadelauncher_secondary_ammo;
return ammo_amount;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_GRENADE_LAUNCHER] = autocvar_g_balance_grenadelauncher_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_GrenadeLauncher_Reload();
ammo_amount += self.weapon_load[WEP_HAGAR] >= autocvar_g_balance_hagar_secondary_ammo;
return ammo_amount;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_HAGAR] = autocvar_g_balance_hagar_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_Hagar_Reload();
ammo_amount += self.weapon_load[WEP_HLAC] >= autocvar_g_balance_hlac_secondary_ammo;
return ammo_amount;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_HLAC] = autocvar_g_balance_hlac_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_HLAC_Reload();
{
return TRUE;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_LASER] = autocvar_g_balance_laser_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_Laser_Reload();
{
return FALSE;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_MINE_LAYER] = autocvar_g_balance_minelayer_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_MineLayer_Reload();
else if (req == WR_RESETPLAYER)
{
self.minstanex_lasthit = 0;
-
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_MINSTANEX] = autocvar_g_balance_minstanex_reload_ammo;
}
else if (req == WR_RELOAD)
{
ammo_amount += self.weapon_load[WEP_NEX] >= autocvar_g_balance_nex_secondary_ammo;
return ammo_amount;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_NEX] = autocvar_g_balance_nex_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_Nex_Reload();
else if (req == WR_RESETPLAYER)
{
self.rl_release = 0;
-
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_ROCKET_LAUNCHER] = autocvar_g_balance_rocketlauncher_reload_ammo;
}
else if (req == WR_RELOAD)
{
ammo_amount += self.weapon_load[WEP_SEEKER] >= autocvar_g_balance_seeker_flac_ammo;
return ammo_amount;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_SEEKER] = autocvar_g_balance_seeker_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_Seeker_Reload();
// melee attack is always available
return TRUE;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_SHOTGUN] = autocvar_g_balance_shotgun_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_Shotgun_Reload();
else if (req == WR_RESETPLAYER)
{
self.sniperrifle_accumulator = time - autocvar_g_balance_sniperrifle_bursttime;
-
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_SNIPERRIFLE] = autocvar_g_balance_sniperrifle_reload_ammo;
}
else if (req == WR_RELOAD)
{
}
return ammo_amount;
}
- else if (req == WR_RESETPLAYER)
- {
- // all weapons must be fully loaded when we spawn
- self.weapon_load[WEP_UZI] = autocvar_g_balance_uzi_reload_ammo;
- }
else if (req == WR_RELOAD)
{
W_UZI_Reload();