this.items = 0;
this.weapons = '0 0 0';
- this.dual_weapons = '0 0 0';
+ PS(this).dual_weapons = '0 0 0';
this.drawonlytoclient = this;
this.weaponmodel = "";
}
SetSpectatee_status(this, 0);
- this.dual_weapons = '0 0 0';
+ PS(this).dual_weapons = '0 0 0';
this.superweapons_finished = (this.weapons & WEPSET_SUPERWEAPONS) ? time + autocvar_g_balance_superweapons_time : 0;
this.superweapons_finished = spectatee.superweapons_finished;
STAT(PRESSED_KEYS, this) = STAT(PRESSED_KEYS, spectatee);
this.weapons = spectatee.weapons;
- this.dual_weapons = spectatee.dual_weapons;
this.vortex_charge = spectatee.vortex_charge;
this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
this.hagar_load = spectatee.hagar_load;
ENDCLASS(Spectator)
CLASS(Player, Client)
+
+ // custom
+
+ ATTRIB(Player, dual_weapons, vector, this.dual_weapons); // TODO: actually WepSet!
+
INIT(Player) {
this.classname = STR_PLAYER;
IL_PUSH(g_players, this);
sprint(this, "Invalid weapon\n");
return false;
}
- if (autocvar_g_weaponswitch_debug == 2 && weaponslot(weaponentity) > 0 && !(wpn.spawnflags & WEP_FLAG_DUALWIELD) && !(this.dual_weapons & wpn.m_wepset))
+ if (autocvar_g_weaponswitch_debug == 2 && weaponslot(weaponentity) > 0 && !(wpn.spawnflags & WEP_FLAG_DUALWIELD) && !(PS(this).dual_weapons & wpn.m_wepset))
return false; // no complaints needed
if (this.weapons & WepSet_FromWeapon(wpn))
{
.entity wepe1 = weaponentities[0];
entity wep1 = actor.(wepe1);
this.m_switchweapon = wep1.m_switchweapon;
- if(!(this.m_switchweapon.spawnflags & WEP_FLAG_DUALWIELD) && !(actor.dual_weapons & wep1.m_switchweapon.m_wepset))
+ entity store = IS_PLAYER(actor) ? PS(actor) : actor;
+ if(!(this.m_switchweapon.spawnflags & WEP_FLAG_DUALWIELD) && !(store.dual_weapons & wep1.m_switchweapon.m_wepset))
{
this.m_weapon = WEP_Null;
this.m_switchingweapon = WEP_Null;