Skip to content

Commit

Permalink
add PressKeyFob to door functions
Browse files Browse the repository at this point in the history
  • Loading branch information
attributeerror authored Jul 26, 2019
1 parent 00c8e33 commit 0f06ed6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vMenu/menus/PersonalVehicle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ private void CreateMenu()

if(item == removeDoorList)
{
PressKeyFob(veh);
SetVehicleDoorBroken(veh.Handle, index, deleteDoors.Checked);
}
}
Expand All @@ -381,6 +382,7 @@ private void CreateMenu()
if (index < 8)
{
bool open = GetVehicleDoorAngleRatio(veh.Handle, index) > 0.1f;
PressKeyFob(veh);
if(open)
{
SetVehicleDoorShut(veh.Handle, index, false);
Expand All @@ -390,18 +392,21 @@ private void CreateMenu()
}
} else if(item == openAll)
{
PressKeyFob(veh);
for(var door = 0; door < 8; door++)
{
SetVehicleDoorOpen(veh.Handle, door, false, false);
}
} else if(item == closeAll)
{
PressKeyFob(veh);
for(var door = 0; door < 8; door++)
{
SetVehicleDoorShut(veh.Handle, door, false);
}
} else if(item == BB && veh.HasBombBay)
{
PressKeyFob(veh);
bool bombBayOpen = AreBombBayDoorsOpen(veh.Handle);
if(bombBayOpen)
{
Expand Down

0 comments on commit 0f06ed6

Please sign in to comment.