1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-10-06 09:07:19 +02:00

Prevent weapon use while driving

This commit is contained in:
Vincent Flyson 2019-01-13 18:56:37 -05:00
parent 08c90fdfb8
commit 490bc91f91

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.