summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-11-11 10:27:40 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-11-11 10:27:40 +0100
commit35874b5fd2b55e92a5033524178aa3bbcabdf8d7 (patch)
tree37bb8e23a1631ff50e71fadc5a1d4e10de195e6f /src/core
parentMerge remote-tracking branch 'upstream/miami' into miami (diff)
downloadre3-35874b5fd2b55e92a5033524178aa3bbcabdf8d7.tar
re3-35874b5fd2b55e92a5033524178aa3bbcabdf8d7.tar.gz
re3-35874b5fd2b55e92a5033524178aa3bbcabdf8d7.tar.bz2
re3-35874b5fd2b55e92a5033524178aa3bbcabdf8d7.tar.lz
re3-35874b5fd2b55e92a5033524178aa3bbcabdf8d7.tar.xz
re3-35874b5fd2b55e92a5033524178aa3bbcabdf8d7.tar.zst
re3-35874b5fd2b55e92a5033524178aa3bbcabdf8d7.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/World.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/World.h b/src/core/World.h
index cfdafedd..be32db20 100644
--- a/src/core/World.h
+++ b/src/core/World.h
@@ -77,7 +77,7 @@ public:
static void Remove(CEntity *entity);
static void Add(CEntity *entity);
- static CSector *GetSector(int x, int y) { if (x > NUMSECTORS_X || y > NUMSECTORS_Y) return &ms_aSectors[0][0]; return &ms_aSectors[y][x]; }
+ static CSector *GetSector(int x, int y) { if (x > NUMSECTORS_X - 1 || y > NUMSECTORS_Y - 1) return &ms_aSectors[0][0]; return &ms_aSectors[y][x]; }
static CPtrList &GetBigBuildingList(eLevelName i) { return ms_bigBuildingsList[i]; }
static CPtrList &GetMovingEntityList(void) { return ms_listMovingEntityPtrs; }
static uint16 GetCurrentScanCode(void) { return ms_nCurrentScanCode; }