Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions source/D2Game/src/MONSTER/MonsterRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -105,16 +105,15 @@ 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;
}
}
}
}
}
}

if (bSpawnMonster)
if (!bNearWarp)
{
if (pRoomCoordList)
{
Expand Down
Loading