mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-25 03:42:48 +01:00
Prevent weapon use while driving
This commit is contained in:
parent
08c90fdfb8
commit
490bc91f91
@ -619,6 +619,11 @@ bool Activities::UseItem::update(CharacterObject *character,
|
||||
auto shootcycle = find_cycle(weapon->animation1);
|
||||
auto throwcycle = find_cycle(weapon->animation2);
|
||||
|
||||
// No weapon except for Uzi can be used while in a vehicle
|
||||
if (character->getCurrentVehicle() && weapon->name != "uzi") {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Instant hit weapons loop their anim
|
||||
// Thrown projectiles have lob / throw.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user