FREESCAPE: fixed bug when loading a game state in eclipse

This commit is contained in:
neuromancer 2024-03-28 11:28:25 +01:00
parent 474ef22e24
commit e52f2643fd
2 changed files with 11 additions and 6 deletions

View File

@ -161,7 +161,11 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
error("Invalid movement across areas");
assert(newPos != -1);
_sensors = _currentArea->getSensors();
}
} else if (entranceID == -1)
debugC(1, kFreescapeDebugMove, "Loading game, no change in position");
else
error("Invalid area change!");
_lastPosition = _position;
_gameStateVars[0x1f] = 0;

View File

@ -156,11 +156,12 @@ void EclipseEngine::gotoArea(uint16 areaID, int entranceID) {
_currentAreaMessages.clear();
_currentAreaMessages.push_back(_currentArea->_name);
if (entranceID == -1)
return;
assert(entranceID > 0);
traverseEntrance(entranceID);
if (entranceID > 0)
traverseEntrance(entranceID);
else if (entranceID == -1)
debugC(1, kFreescapeDebugMove, "Loading game, no change in position");
else
error("Invalid area change!");
_lastPosition = _position;