summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-26 20:11:11 +0200
committeraap <aap@papnet.eu>2019-07-26 20:11:11 +0200
commite340400875d6aa7a120aa1c6111b8eb93d4ed6b9 (patch)
tree39906341bcff483bd7e559b114ac48a58d33e55d
parentCAutomobile effect stuff (diff)
downloadre3-e340400875d6aa7a120aa1c6111b8eb93d4ed6b9.tar
re3-e340400875d6aa7a120aa1c6111b8eb93d4ed6b9.tar.gz
re3-e340400875d6aa7a120aa1c6111b8eb93d4ed6b9.tar.bz2
re3-e340400875d6aa7a120aa1c6111b8eb93d4ed6b9.tar.lz
re3-e340400875d6aa7a120aa1c6111b8eb93d4ed6b9.tar.xz
re3-e340400875d6aa7a120aa1c6111b8eb93d4ed6b9.tar.zst
re3-e340400875d6aa7a120aa1c6111b8eb93d4ed6b9.zip
-rw-r--r--src/vehicles/Automobile.cpp10
-rw-r--r--src/vehicles/Automobile.h2
2 files changed, 6 insertions, 6 deletions
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){
diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h
index 59359bad..959b83e4 100644
--- a/src/vehicles/Automobile.h
+++ b/src/vehicles/Automobile.h
@@ -108,7 +108,7 @@ public:
void BlowUpCar(CEntity *ent);
bool SetUpWheelColModel(CColModel *colModel);
void BurstTyre(uint8 tyre);
- bool IsRoomForPedToLeaveCar(uint32 component, CVector *forcedDoorPos);
+ bool IsRoomForPedToLeaveCar(uint32 component, CVector *doorOffset);
float GetHeightAboveRoad(void);
void PlayCarHorn(void);