diff --git a/Runtime/AutoMapper/CMapWorldInfo.cpp b/Runtime/AutoMapper/CMapWorldInfo.cpp index be80faa51..b30647c18 100644 --- a/Runtime/AutoMapper/CMapWorldInfo.cpp +++ b/Runtime/AutoMapper/CMapWorldInfo.cpp @@ -54,7 +54,7 @@ void CMapWorldInfo::SetDoorVisited(TEditorId eid, bool visited) { x28_visitedDoo bool CMapWorldInfo::IsDoorVisited(TEditorId eid) const { return x28_visitedDoors.find(eid) != x28_visitedDoors.end(); } bool CMapWorldInfo::IsAreaVisted(TAreaId aid) const { - if (aid + 1 > x0_visitedAreasAllocated) { + if (u32(aid) + 1 > x0_visitedAreasAllocated) { const_cast(*this).x4_visitedAreas.resize((aid + 32) / 32); const_cast(*this).x0_visitedAreasAllocated = aid + 1; } @@ -62,7 +62,7 @@ bool CMapWorldInfo::IsAreaVisted(TAreaId aid) const { } void CMapWorldInfo::SetAreaVisited(TAreaId aid, bool visited) { - if (aid + 1 > x0_visitedAreasAllocated) { + if (u32(aid) + 1 > x0_visitedAreasAllocated) { x4_visitedAreas.resize((aid + 32) / 32); x0_visitedAreasAllocated = aid + 1; } @@ -73,7 +73,7 @@ void CMapWorldInfo::SetAreaVisited(TAreaId aid, bool visited) { } bool CMapWorldInfo::IsMapped(TAreaId aid) const { - if (aid + 1 > x14_mappedAreasAllocated) { + if (u32(aid) + 1 > x14_mappedAreasAllocated) { const_cast(*this).x18_mappedAreas.resize((aid + 32) / 32); const_cast(*this).x14_mappedAreasAllocated = aid + 1; } @@ -81,7 +81,7 @@ bool CMapWorldInfo::IsMapped(TAreaId aid) const { } void CMapWorldInfo::SetIsMapped(TAreaId aid, bool mapped) { - if (aid + 1 > x14_mappedAreasAllocated) { + if (u32(aid) + 1 > x14_mappedAreasAllocated) { x18_mappedAreas.resize((aid + 32) / 32); x14_mappedAreasAllocated = aid + 1; }