trigger weaponswitch for others (issue #257)
This commit is contained in:
+8
-1
@@ -534,7 +534,14 @@ public:
|
||||
curskin = nextskin[team_base(team)];
|
||||
}
|
||||
|
||||
void selectweapon(int w) { if (weaponsel) prevweaponsel = weaponsel; weaponsel = weapons[(gunselect = w)]; if (!prevweaponsel) prevweaponsel = weaponsel; }
|
||||
void selectweapon(int w, bool other = false)
|
||||
{
|
||||
if(weaponsel) prevweaponsel = weaponsel;
|
||||
weaponsel = weapons[(gunselect = w)];
|
||||
if(!prevweaponsel) prevweaponsel = weaponsel;
|
||||
if(other && (prevweaponsel != weaponsel)) weaponswitch(weaponsel, true);
|
||||
}
|
||||
|
||||
void setprimary(int w) { primweap = weapons[(primary = w)]; }
|
||||
void setnextprimary(int w) { nextprimweap = weapons[(nextprimary = w)]; }
|
||||
bool isspectating() { return state==CS_SPECTATE || (state==CS_DEAD && spectatemode > SM_NONE); }
|
||||
|
||||
Reference in New Issue
Block a user