summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Garages.cpp4
-rw-r--r--src/control/Script.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 9e10af2d..84d49bee 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1679,7 +1679,7 @@ float CGarage::CalcDistToGarageRectangleSquared(float X, float Y)
else
distX = 0.0f;
if (Y < m_fY1)
- distY = m_fY1 - X;
+ distY = m_fY1 - Y;
else if (Y > m_fY2)
distY = Y - m_fY2;
else
@@ -2358,4 +2358,4 @@ STARTPATCHES
InjectHook(0x427AB0, CGarages::IsPointInAGarageCameraZone, PATCH_JUMP); // CCamera::CamControl
InjectHook(0x427BC0, CGarages::CameraShouldBeOutside, PATCH_JUMP); // CCamera::CamControl
InjectHook(0x428940, CGarages::Load, PATCH_JUMP); // GenericLoad
-ENDPATCHES \ No newline at end of file
+ENDPATCHES
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 6b79265a..18572573 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -7117,7 +7117,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
case COMMAND_CLOSE_GARAGE:
{
CollectParameters(&m_nIp, 1);
- CGarages::CloseGarage(ScriptParams[1]);
+ CGarages::CloseGarage(ScriptParams[0]);
return 0;
}
case COMMAND_WARP_CHAR_FROM_CAR_TO_COORD:
@@ -9141,7 +9141,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
assert(pVehicle);
assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR);
CAutomobile* pCar = (CAutomobile*)pVehicle;
- pCar->bTakeLessDamage = ScriptParams[1];
+ pCar->bMoreResistantToDamage = ScriptParams[1];
return 0;
}
case COMMAND_SET_JAMES_CAR_ON_PATH_TO_PLAYER: