TRECISION: Don't refresh objs outside of the current room - bug #12625

This commit is contained in:
Filippos Karapetis 2021-06-20 17:03:41 +03:00
parent 7ebd9c9558
commit 95cec50195

View File

@ -339,6 +339,15 @@ void TrecisionEngine::setObjectVisible(uint16 objectId, bool visible) {
}
void TrecisionEngine::refreshObject(uint16 objectId) {
for (int i = 0; i < MAXOBJINROOM; ++i) {
if (!_room[_curRoom]._object[i])
return; // reached the end of the list, object not found
if (objectId == _room[_curRoom]._object[i]) {
break; // object found in room objects, continue
}
}
if (_obj[objectId].isModeMask() || _obj[objectId].isModeFull()) {
SSortTable entry;
entry._objectId = objectId;