From 1b936f6ffbe71e2c44ef1a5b5d5e7a24801434c7 Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 10 May 2020 11:20:27 +0200 Subject: CClumpModelInfo; little fixes --- src/core/World.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/World.cpp b/src/core/World.cpp index 29505481..3e07721a 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -382,7 +382,11 @@ CWorld::ProcessVerticalLine(const CVector &point1, float z2, CColPoint &point, C { AdvanceCurrentScanCode(); CVector point2(point1.x, point1.y, z2); - return ProcessVerticalLineSector(*GetSector(GetSectorIndexX(point1.x), GetSectorIndexY(point1.y)), + int secX = GetSectorIndexX(point1.x); + int secY = GetSectorIndexY(point1.y); + secX = clamp(secX, 0, NUMSECTORS_X-1); + secY = clamp(secY, 0, NUMSECTORS_Y-1); + return ProcessVerticalLineSector(*GetSector(secX, secY), CColLine(point1, point2), point, entity, checkBuildings, checkVehicles, checkPeds, checkObjects, checkDummies, ignoreSeeThrough, poly); } -- cgit v1.2.3