mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
Merge pull request #686 from vflyson/patch-1
Prevent weapon use while driving
This commit is contained in:
commit
530a7d35ac
@ -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