You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, RemovePlayerWeapon removes any weapon without setting armed (holding) weapon to the last reported by that player and it looks not so nice. Let's imagine 2 cases to see what happens and what can be done to improve this behaviour.
Case 1:
Player has deagle, shotgun and rifle, deagle is armed in his hands at the moment. Server tries to remove shotgun, RemovePlayerWeapon re-gives all weapons and the armed weapon automatically switches to rifle for this player.
Case 2:
Player has deagle, shotgun and rifle, deagle is armed in his hands at the moment. Server tries to remove deagle, RemovePlayerWeapon re-gives all weapons and the armed weapon still automatically switches to rifle for this player.
What can be done to easily correct case 1 behaviour is to just switch armed weapon to the last armed weapon which player had, if this weapon wasn't removed by the server. Case 2 is probably more complicated to decide which weapon this player should be switched to after removing exactly the one he was holding. This could be either switched to slot 0 (fist/brass knuckles), or the other variant is to switch it to the next weapon slot after the one that was removed.
The text was updated successfully, but these errors were encountered:
The first case I agree should be fixed. The second case you suggest switching to fists or the next slot. Of those I'd think fists made more sense - if you lose the weapon you're holding then you're by definition not holding anything. However, I don't think the current behaviour is really worth worrying about if it doesn't need to be, switching to the last slot is not really any different to switching to the next slot, it's still a fairly arbitrary choice.
Currently, RemovePlayerWeapon removes any weapon without setting armed (holding) weapon to the last reported by that player and it looks not so nice. Let's imagine 2 cases to see what happens and what can be done to improve this behaviour.
Case 1:
Player has deagle, shotgun and rifle, deagle is armed in his hands at the moment. Server tries to remove shotgun, RemovePlayerWeapon re-gives all weapons and the armed weapon automatically switches to rifle for this player.
Case 2:
Player has deagle, shotgun and rifle, deagle is armed in his hands at the moment. Server tries to remove deagle, RemovePlayerWeapon re-gives all weapons and the armed weapon still automatically switches to rifle for this player.
What can be done to easily correct case 1 behaviour is to just switch armed weapon to the last armed weapon which player had, if this weapon wasn't removed by the server. Case 2 is probably more complicated to decide which weapon this player should be switched to after removing exactly the one he was holding. This could be either switched to slot 0 (fist/brass knuckles), or the other variant is to switch it to the next weapon slot after the one that was removed.
The text was updated successfully, but these errors were encountered: