mirror of https://github.com/AxioDL/metaforce.git
Some decomp fixes for CScriptGenerator::AcceptScriptMsg
This commit is contained in:
parent
9fd63e4649
commit
b1ffc45307
|
@ -35,10 +35,13 @@ 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) {
|
||||||
|
const CEntity* ent = stateMgr.GetObjectById(uid);
|
||||||
|
if (ent && ent->GetActive()) {
|
||||||
follows.push_back(uid);
|
follows.push_back(uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (follows.empty()) {
|
if (follows.empty()) {
|
||||||
follows.push_back(sender);
|
follows.push_back(sender);
|
||||||
|
@ -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