Fix vehicle steering not reset after driver leaves
This commit is contained in:
parent
1079daa49b
commit
5b5b6e66ab
@ -53,7 +53,6 @@ void game::DrivableVehicle::Use(PlayerCharacter& character, uint32_t target_id)
|
|||||||
PlaySound("cardoor", 1.0f, RandomFloat(0.9f, 1.1f));
|
PlaySound("cardoor", 1.0f, RandomFloat(0.9f, 1.1f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void game::DrivableVehicle::SetRideableInput(PlayerInputFlags in)
|
void game::DrivableVehicle::SetRideableInput(PlayerInputFlags in)
|
||||||
{
|
{
|
||||||
SetInputs(MapPlayerInputToVehicleInput(in));
|
SetInputs(MapPlayerInputToVehicleInput(in));
|
||||||
@ -64,6 +63,7 @@ void game::DrivableVehicle::OnPassengerChanged(size_t seat_idx, HumanCharacter*
|
|||||||
if (seat_idx == 0 && !passenger)
|
if (seat_idx == 0 && !passenger)
|
||||||
{
|
{
|
||||||
// driver left
|
// driver left
|
||||||
|
SetSteering(false, 0.0f);
|
||||||
SetInputs(0);
|
SetInputs(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user