mirror of https://github.com/AxioDL/metaforce.git
Some decomp fixes for CScriptGenerator::AcceptScriptMsg
This commit is contained in:
parent
9fd63e4649
commit
b1ffc45307
|
@ -35,8 +35,11 @@ void CScriptGenerator::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sende
|
||||||
}
|
}
|
||||||
|
|
||||||
const TUniqueId uid = stateMgr.GetIdForScript(conn.x8_objId);
|
const TUniqueId uid = stateMgr.GetIdForScript(conn.x8_objId);
|
||||||
if (stateMgr.GetObjectById(uid) != nullptr) {
|
if (uid != kInvalidUniqueId) {
|
||||||
follows.push_back(uid);
|
const CEntity* ent = stateMgr.GetObjectById(uid);
|
||||||
|
if (ent && ent->GetActive()) {
|
||||||
|
follows.push_back(uid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +85,7 @@ void CScriptGenerator::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sende
|
||||||
for (u32 j = 0; j < activates.size(); ++j) {
|
for (u32 j = 0; j < activates.size(); ++j) {
|
||||||
if (TCastToConstPtr<CScriptSound>(stateMgr.GetObjectById(activates[j].first))) {
|
if (TCastToConstPtr<CScriptSound>(stateMgr.GetObjectById(activates[j].first))) {
|
||||||
activatesRand = j;
|
activatesRand = j;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue