1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-25 11:52:40 +01:00

Merge pull request #686 from vflyson/patch-1

Prevent weapon use while driving
This commit is contained in:
Daniel Evans 2019-01-18 20:42:50 +00:00 committed by GitHub
commit 530a7d35ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.