mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-19 10:41:55 +00:00
ULTIMA8: Add comment about iteration order
This function looks tempting to "optimize", by changing the order, so add a warning for new adventurers.
This commit is contained in:
parent
cbb3346210
commit
531ed6865b
@ -572,6 +572,15 @@ void CurrentMap::areaSearch(UCList *itemlist, const uint8 *loopscript,
|
||||
int maxy = ((y + range) / _mapChunkSize) + 1;
|
||||
clipMapChunks(minx, maxx, miny, maxy);
|
||||
|
||||
//
|
||||
// NOTE: Iteration order of chunks here is important for
|
||||
// usecode compatibility!
|
||||
//
|
||||
// eg, No Remorse Mission 2 has a camera which searches for
|
||||
// trigger with qlo = 5, but there are 2 of those on the map.
|
||||
// We need to return in the correct order or it triggers
|
||||
// the wrong one and breaks the game.
|
||||
//
|
||||
for (int cy = miny; cy <= maxy; cy++) {
|
||||
for (int cx = minx; cx <= maxx; cx++) {
|
||||
item_list::const_iterator iter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user