self.model = "";
self.modelindex = 0;
self.weapon = 0;
+ self.weaponname = "";
self.switchingweapon = 0;
self.weaponmodel = "";
self.weaponentity = world;
self.switchweapon = w_getbestweapon(self);
self.cnt = self.switchweapon;
self.weapon = 0;
+ self.weaponname = "";
self.switchingweapon = 0;
if(!self.alivetime)
.vector weapon_morph4origin;
.vector weapon_morph4angles;
.float weapon_morph4time;
-.string weaponname;
#define QCWEAPONANIMATION_ORIGIN(e) ((weapon_offset_x + e.view_ofs_x) * v_forward - (weapon_offset_y + e.view_ofs_y) * v_right + (weapon_offset_z + e.view_ofs_z) * v_up + weapon_adjust)
/*
self.weaponentity.model = "";
return;
}
- if (self.cnt != self.owner.weapon || self.dmg != self.owner.modelindex || self.deadflag != self.owner.deadflag)
+ if (self.weaponname != self.owner.weaponname || self.dmg != self.owner.modelindex || self.deadflag != self.owner.deadflag)
{
- self.cnt = self.owner.weapon;
+ self.weaponname = self.owner.weaponname;
self.dmg = self.owner.modelindex;
self.deadflag = self.owner.deadflag;
self.model = "";
return;
}
- if (self.cnt != self.owner.weapon || self.dmg != self.owner.modelindex || self.deadflag != self.owner.deadflag)
+ if (self.weaponname != self.owner.weaponname || self.dmg != self.owner.modelindex || self.deadflag != self.owner.deadflag)
{
- self.cnt = self.owner.weapon;
+ self.weaponname = self.owner.weaponname;
self.dmg = self.owner.modelindex;
self.deadflag = self.owner.deadflag;
if (self.owner.weaponname != "")
//.float weapon; // current weapon
.float switchweapon; // weapon requested to switch to
.float switchingweapon; // weapon currently being switched to (is copied from switchweapon once switch is possible)
+.string weaponname; // name of .weapon
.float autoswitch;
float weapon_action(float wpn, float wrequest);