if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars
self.weapon_load[j] = cvar(strcat("g_balance_", e.netname, "_reload_ammo"));
}
- self.weapon_forbidchange = FALSE;
oldself = self;
self = spot;
w = self.weapon;
if (w == 0)
return; // just in case
- if(self.weapon_forbidchange)
- return;
if(MUTATOR_CALLHOOK(ForbidThrowCurrentWeapon))
return;
if(!autocvar_g_weapon_throwable)
void W_SwitchWeapon_Force(entity e, float w)
{
- // don't switch to another weapon if we're not allowed to
- if(e.weapon_forbidchange)
- return;
-
e.cnt = e.switchweapon;
e.switchweapon = w;
e.selectweapon = w;
void w_ready();
// VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies)
.float weapon_nextthink;
-.float weapon_forbidchange;
.void() weapon_think;
//float PLAYER_WEAPONSELECTION_DELAY = );
if(self.hagar_load)
{
- self.weapon_forbidchange = TRUE;
if(!self.BUTTON_ATCK2 || ((loaded || !enough_ammo) && self.hagar_loadstep < time && !autocvar_g_balance_hagar_secondary_load_hold))
W_Hagar_Attack2_Load_Release();
}
else
{
- self.weapon_forbidchange = FALSE;
self.hagar_loadbeep = FALSE;
}