EMI/GRIM: Nothing should be visible if actor is not in current set

When fiddling with the controls in the Palace of Prosthetics Guybrush is
temporarily put into set "nil". No items should be visible to him in this
situation.
This commit is contained in:
Ingo van Lil 2013-12-22 01:50:38 +01:00
parent 9edcb2fd67
commit bf1e83deaa

View File

@ -1406,13 +1406,15 @@ void Lua_V1::GetVisibleThings() {
lua_Object result = lua_createtable();
// TODO verify code below
foreach (Actor *a, g_grim->getActiveActors()) {
// Consider the active actor visible
if (actor == a || actor->getYawTo(a) < 90) {
lua_pushobject(result);
lua_pushusertag(a->getId(), MKTAG('A','C','T','R'));
lua_pushnumber(1);
lua_settable();
if (actor->isInSet(g_grim->getCurrSet()->getName())) {
foreach (Actor *a, g_grim->getActiveActors()) {
// Consider the active actor visible
if (actor == a || actor->getYawTo(a) < 90) {
lua_pushobject(result);
lua_pushusertag(a->getId(), MKTAG('A','C','T','R'));
lua_pushnumber(1);
lua_settable();
}
}
}
lua_pushobject(result);