diff --git a/source/D2Game/src/MONSTER/MonsterRegion.cpp b/source/D2Game/src/MONSTER/MonsterRegion.cpp index f5456534..0d3a4417 100644 --- a/source/D2Game/src/MONSTER/MonsterRegion.cpp +++ b/source/D2Game/src/MONSTER/MonsterRegion.cpp @@ -71,7 +71,7 @@ int32_t __fastcall sub_6FC66260(D2GameStrc* pGame, D2ActiveRoomStrc* pRoom, D2Ro const int32_t nX = ITEMS_RollLimitedRandomNumber(pSeed, nRight) + nLeft; const int32_t nY = ITEMS_RollLimitedRandomNumber(pSeed, nBottom) + nTop; - int32_t bSpawnMonster = 0; + int32_t bNearWarp = 0; if (a7 && pRoom) { const int32_t nLevelId = DUNGEON_GetLevelIdFromRoom(pRoom); @@ -87,12 +87,12 @@ int32_t __fastcall sub_6FC66260(D2GameStrc* pGame, D2ActiveRoomStrc* pRoom, D2Ro const int32_t nYDiff = nY - pWarpCoordinates[j + 9]; if (nXDiff * nXDiff + nYDiff * nYDiff < nWarpDist) { - bSpawnMonster = 1; + bNearWarp = 1; break; } } - if (!bSpawnMonster) + if (!bNearWarp) { int32_t nSpawnX = 0; int32_t nSpawnY = 0; @@ -105,8 +105,7 @@ int32_t __fastcall sub_6FC66260(D2GameStrc* pGame, D2ActiveRoomStrc* pRoom, D2Ro const int32_t nYDiff = nY - nSpawnY; if (nXDiff * nXDiff + nYDiff * nYDiff < nWarpDist) { - bSpawnMonster = 1; - break; + bNearWarp = 1; } } } @@ -114,7 +113,7 @@ int32_t __fastcall sub_6FC66260(D2GameStrc* pGame, D2ActiveRoomStrc* pRoom, D2Ro } } - if (bSpawnMonster) + if (!bNearWarp) { if (pRoomCoordList) {