SAGA2: Fix unsafe world access on objObscured

This commit is contained in:
a/
2021-07-01 01:37:20 +02:00
committed by Eugene Sandulenko
parent 291add3cd6
commit 5e599dfb6e
+4
View File
@@ -4356,11 +4356,15 @@ bool objObscured(GameObject *testObj) {
bool obscured = false;
if (isObject(testObj)) {
debug(3, "STUB: objObscured");
Point16 drawPos,
org;
ObjectSpriteInfo objSprInfo;
ColorTable objColors;
ProtoObj *proto = testObj->proto();
ObjectID parent = testObj->_data.parentID;
if (isWorld(parent) == false)
return false;
// Calculate X, Y coordinates of the sprite
TileToScreenCoords(testObj->getLocation(), drawPos);