mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-25 11:52:40 +01:00
Merge pull request #473 from husho/patch-3
Fixed: mission is not restarting if player is in vehicle
This commit is contained in:
commit
a8110de63e
@ -173,6 +173,14 @@ void PlayerController::restart() {
|
||||
state->hospitalIslandOverride = 0;
|
||||
state->policeIslandOverride = 0;
|
||||
|
||||
// If we are in vehicle get us out
|
||||
auto* vehicle = character->getCurrentVehicle();
|
||||
if (vehicle) {
|
||||
auto seat = character->getCurrentSeat();
|
||||
character->setCurrentVehicle(nullptr, seat);
|
||||
vehicle->setOccupant(seat, nullptr);
|
||||
}
|
||||
|
||||
// Clear whole world
|
||||
// Original game uses 4000.f radius
|
||||
world->clearObjectsWithinArea(character->getPosition(), 10000.f, true);
|
||||
|
Loading…
Reference in New Issue
Block a user