protocol robustness (based on _Flo comment)
This commit is contained in:
+2
-1
@@ -538,13 +538,14 @@ public:
|
||||
|
||||
void selectweapon(int w, bool other = false)
|
||||
{
|
||||
if(!valid_weapon(w)) return;
|
||||
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 setprimary(int w) { if(!valid_weapon(w)) return; primweap = weapons[(primary = w)]; }
|
||||
void setnextprimary(int w) { nextprimweap = weapons[(nextprimary = w)]; }
|
||||
bool isspectating() { return state==CS_SPECTATE || (state==CS_DEAD && spectatemode > SM_NONE); }
|
||||
void weaponswitch(weapon *w, bool sound = true)
|
||||
|
||||
Reference in New Issue
Block a user