Ensure that zones/animations always get the same index number.

When a zone/animation is skipped by the parser because already
loaded, the index is now increased. This does not affect NS, since
indexes are only used for scene sorting there, but is relevant for
BRA, where indexes need to be coherent across location changes.

Patch #3004008 by fuzzie.

svn-id: r49428
This commit is contained in:
Nicola Mettifogo 2010-06-04 13:48:09 +00:00
parent 3d98f679e7
commit 9906030312

View File

@ -286,6 +286,7 @@ void LocationParser_ns::parseAnimation(AnimationList &list, char *name) {
debugC(5, kDebugParser, "parseAnimation(name: %s)", name);
if (_vm->_location.findAnimation(name)) {
_zoneProg++;
_script->skip("endanimation");
return;
}
@ -1305,6 +1306,7 @@ void LocationParser_ns::parseZone(ZoneList &list, char *name) {
debugC(5, kDebugParser, "parseZone(name: %s)", name);
if (_vm->_location.findZone(name)) {
_zoneProg++;
_script->skip("endzone");
return;
}