Make custom GEO_ASMs work inside level geo

This commit is contained in:
Agent X 2025-03-01 19:09:35 -05:00
parent 1f0c44dd9e
commit 5eb1a27eb4

View file

@ -126,6 +126,20 @@ bool DynOS_Actor_GetModIndexAndToken(const GraphNode *aGraphNode, u32 aTokenInde
}
return true;
}
} else { // try the active level
GfxData *_GfxData = DynOS_Lvl_GetActiveGfx();
if (_GfxData) {
if (outModIndex) {
*outModIndex = _GfxData->mModIndex;
}
if (outToken) {
if (!aTokenIndex || aTokenIndex > _GfxData->mLuaTokenList.Count()) {
return false;
}
*outToken = _GfxData->mLuaTokenList[aTokenIndex - 1].begin(); // token index is 1-indexed
}
return true;
}
}
return false;
}