Fixed Random Spawns (#8397)
- Fixed monsters with random spawn location to sometimes spawn on (0,0) if that cell is not a wall - Follow-up to 5d232db
This commit is contained in:
parent
1c96180fe6
commit
23e7e1f367
@ -5323,7 +5323,8 @@ static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const c
|
||||
if (battle_config.force_random_spawn || (mob.x == 0 && mob.y == 0)
|
||||
|| (mob.xs == 1 && mob.ys == 1 && !map_getcell(mob.m, mob.x, mob.y, CELL_CHKREACH)))
|
||||
{ //Force a random spawn anywhere on the map.
|
||||
mob.x = mob.y = 0;
|
||||
// Set x and y to -1 to prevent fallback spawn on cell 0,0
|
||||
mob.x = mob.y = -1;
|
||||
mob.xs = mob.ys = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user