diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-11-11 12:27:40 +0300 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-11-11 12:27:40 +0300 |
commit | 35874b5fd2b55e92a5033524178aa3bbcabdf8d7 (patch) | |
tree | 37bb8e23a1631ff50e71fadc5a1d4e10de195e6f /src | |
parent | a67d4c70d703197577bf3dbd54add86c9c297891 (diff) |
fix
Diffstat (limited to 'src')
-rw-r--r-- | src/core/World.h | 2 |
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; } |