From e340400875d6aa7a120aa1c6111b8eb93d4ed6b9 Mon Sep 17 00:00:00 2001 From: aap Date: Fri, 26 Jul 2019 20:11:11 +0200 Subject: fixed CAutomobile bug --- src/vehicles/Automobile.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/vehicles/Automobile.cpp') diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 5fc29f59..851eaa28 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -2930,7 +2930,7 @@ CAutomobile::BurstTyre(uint8 wheel) } bool -CAutomobile::IsRoomForPedToLeaveCar(uint32 component, CVector *forcedDoorPos) +CAutomobile::IsRoomForPedToLeaveCar(uint32 component, CVector *doorOffset) { CColPoint colpoint; CEntity *ent; @@ -2957,11 +2957,11 @@ CAutomobile::IsRoomForPedToLeaveCar(uint32 component, CVector *forcedDoorPos) seatPos = GetMatrix() * seatPos; CVector doorPos = CPed::GetPositionToOpenCarDoor(this, component); - if(forcedDoorPos){ - doorPos = *forcedDoorPos; + if(doorOffset){ + CVector off = *doorOffset; if(component == CAR_DOOR_RF || component == CAR_DOOR_RR) - doorPos.x = -doorPos.x; - doorPos = Multiply3x3(GetMatrix(), doorPos); + off.x = -off.x; + doorPos += Multiply3x3(GetMatrix(), off); } if(GetUp().z < 0.0f){ -- cgit v1.2.3