mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Prevent firing weapon if there is a weapon command
This prevent tricks like firing and dropping weapon to shoot silently
This commit is contained in:
parent
3e9d2bf89a
commit
78cd0cf28b
1 changed files with 7 additions and 0 deletions
|
@ -11687,6 +11687,13 @@ void Player::FireWeapon(int number, firemode_t mode)
|
|||
return;
|
||||
}
|
||||
|
||||
if ((last_ucmd.buttons & WEAPON_COMMAND_MASK) >> 7) {
|
||||
// Added in OPM
|
||||
// If there is a weapon command (like DROP), then remove don't fire
|
||||
// this prevent tricky behaviors, like silent firing
|
||||
return;
|
||||
}
|
||||
|
||||
Sentient::FireWeapon(number, mode);
|
||||
|
||||
if (g_gametype->integer != GT_SINGLE_PLAYER) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue