summaryrefslogtreecommitdiffstats
path: root/src/control/Garages.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-12-31 17:29:13 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-12-31 17:29:13 +0100
commit56ea1c7be77a9a8d14c77401ba7ecb76cb891d34 (patch)
treeadee22ae424788aed56475b6e7ae3ba77680c62b /src/control/Garages.cpp
parentfix UB (diff)
downloadre3-56ea1c7be77a9a8d14c77401ba7ecb76cb891d34.tar
re3-56ea1c7be77a9a8d14c77401ba7ecb76cb891d34.tar.gz
re3-56ea1c7be77a9a8d14c77401ba7ecb76cb891d34.tar.bz2
re3-56ea1c7be77a9a8d14c77401ba7ecb76cb891d34.tar.lz
re3-56ea1c7be77a9a8d14c77401ba7ecb76cb891d34.tar.xz
re3-56ea1c7be77a9a8d14c77401ba7ecb76cb891d34.tar.zst
re3-56ea1c7be77a9a8d14c77401ba7ecb76cb891d34.zip
Diffstat (limited to '')
-rw-r--r--src/control/Garages.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 876840c4..53cebeea 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1722,10 +1722,10 @@ void CGarage::FindDoorsEntities()
{
m_pDoor1 = nil;
m_pDoor2 = nil;
- int xstart = Max(0, CWorld::GetSectorIndexX(GetGarageCenterX()));
- int xend = Min(NUMSECTORS_X - 1, CWorld::GetSectorIndexX(m_fSupX));
- int ystart = Max(0, CWorld::GetSectorIndexY(GetGarageCenterY()));
- int yend = Min(NUMSECTORS_Y - 1, CWorld::GetSectorIndexY(m_fSupY));
+ int xstart = Max(0, CWorld::GetSectorIndexX(GetGarageCenterX() - 100.0f));
+ int xend = Min(NUMSECTORS_X - 1, CWorld::GetSectorIndexX(GetGarageCenterX() + 100.0f));
+ int ystart = Max(0, CWorld::GetSectorIndexY(GetGarageCenterY() - 100.0f));
+ int yend = Min(NUMSECTORS_Y - 1, CWorld::GetSectorIndexY(GetGarageCenterY() + 100.0f));
assert(xstart <= xend);
assert(ystart <= yend);