diff --git a/Runtime/World/CScriptRandomRelay.cpp b/Runtime/World/CScriptRandomRelay.cpp index e6946d749..6c072b4a4 100644 --- a/Runtime/World/CScriptRandomRelay.cpp +++ b/Runtime/World/CScriptRandomRelay.cpp @@ -34,10 +34,24 @@ void CScriptRandomRelay::SendLocalScriptMsgs(EScriptObjectState state, CStateMan #if 0 std::vector> objs; objs.reserve(10); - for (SConnection& conn : x20_conns) + for (const SConnection& conn : x20_conns) { - const std::unique_ptr& objList = stateMgr.GetObjectList(); + auto list = stateMgr.GetIdListForScript(conn.x8_objId); + auto it = list.first; + for (; it != list.second; ++it) + { + CEntity* ent = stateMgr.ObjectById(it->second); + if (ent && ent->GetActive()) + objs.emplace_back(ent, conn.x4_msg); + } } + + u32 r0 = x34_connectionCount; + if (x3c_clamp) + r0 = u32(0.5 + (float(x34_connectionCount) / 100.f)); + + float fVariance = float(x38_variance) * (2.f * stateMgr.GetActiveRandom()->Float()); + #endif } } diff --git a/amuse b/amuse index 28cac7ff8..af68ee61e 160000 --- a/amuse +++ b/amuse @@ -1 +1 @@ -Subproject commit 28cac7ff8373e0386d44492f27e717d6dee0e44a +Subproject commit af68ee61e15567e74f057964fb2b852476c1e666