this.(weaponentity).m_switchweapon = WEP_Null;
this.(weaponentity).weaponname = "";
this.(weaponentity).m_switchingweapon = WEP_Null;
+ this.cnt = -1;
}
- this.cnt = -1; // TODO
-
if (!warmup_stage && !this.alivetime)
this.alivetime = time;
//if(w == 0)
// w = player.switchweapon;
if(w == 0)
- w = player.cnt; // previous weapon!
+ w = player.(weaponentity).cnt; // previous weapon!
s = strcat(s, ftos(w));
if(time < player.strength_finished)
s = strcat(s, "S");
case "l": replacement = NearestLocation(this.origin); break;
case "y": replacement = NearestLocation(cursor); break;
case "d": replacement = NearestLocation(this.death_origin); break;
- case "w": replacement = ((this.(weaponentity).m_weapon == WEP_Null) ? ((this.(weaponentity).m_switchweapon == WEP_Null) ? Weapons_from(this.cnt) : this.(weaponentity).m_switchweapon) : this.(weaponentity).m_weapon).m_name; break;
+ case "w": replacement = ((this.(weaponentity).m_weapon == WEP_Null) ? ((this.(weaponentity).m_switchweapon == WEP_Null) ? Weapons_from(this.(weaponentity).cnt) : this.(weaponentity).m_switchweapon) : this.(weaponentity).m_weapon).m_name; break;
case "W": replacement = ammoitems; break;
case "x": replacement = ((cursor_ent.netname == "" || !cursor_ent) ? "nothing" : cursor_ent.netname); break;
case "s": replacement = ftos(vlen(this.velocity - this.velocity_z * '0 0 1')); break;
// previously used if exists and has ammo, (second) best otherwise
void W_LastWeapon(entity this, .entity weaponentity)
{
- Weapon wep = Weapons_from(this.cnt);
+ Weapon wep = Weapons_from(this.(weaponentity).cnt);
if (client_hasweapon(this, wep, true, false))
W_SwitchWeapon(this, wep, weaponentity);
else