mirror of https://github.com/AxioDL/metaforce.git
Fix translation error in CScriptGenerator
This commit is contained in:
parent
696f7a9772
commit
f57b44a786
|
@ -6,13 +6,13 @@
|
||||||
namespace urde
|
namespace urde
|
||||||
{
|
{
|
||||||
|
|
||||||
CScriptGenerator::CScriptGenerator(TUniqueId uid, const std::string& name, const CEntityInfo& info, u32 w1, bool b1,
|
CScriptGenerator::CScriptGenerator(TUniqueId uid, const std::string& name, const CEntityInfo& info, u32 spawnCount,
|
||||||
const zeus::CVector3f& vec1, bool follow, bool active, float minScale,
|
bool reuseFollowers, const zeus::CVector3f& vec1, bool inheritXf, bool active,
|
||||||
float maxScale)
|
float minScale, float maxScale)
|
||||||
: CEntity(uid, info, active, name)
|
: CEntity(uid, info, active, name)
|
||||||
, x34_spawnCount(w1)
|
, x34_spawnCount(spawnCount)
|
||||||
, x38_24_reuseFollowers(b1)
|
, x38_24_reuseFollowers(reuseFollowers)
|
||||||
, x38_25_inheritTransform(follow)
|
, x38_25_inheritTransform(inheritXf)
|
||||||
, x3c_offset(vec1)
|
, x3c_offset(vec1)
|
||||||
, x48_minScale(minScale)
|
, x48_minScale(minScale)
|
||||||
, x4c_maxScale(maxScale)
|
, x4c_maxScale(maxScale)
|
||||||
|
@ -99,7 +99,7 @@ void CScriptGenerator::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId
|
||||||
{
|
{
|
||||||
if (x38_25_inheritTransform)
|
if (x38_25_inheritTransform)
|
||||||
activateActor->SetTransform(followActor->GetTransform());
|
activateActor->SetTransform(followActor->GetTransform());
|
||||||
activateActor->SetTranslation(activateActor->GetTranslation() + x3c_offset);
|
activateActor->SetTranslation(followActor->GetTranslation() + x3c_offset);
|
||||||
}
|
}
|
||||||
else if (follow != nullptr)
|
else if (follow != nullptr)
|
||||||
{
|
{
|
||||||
|
@ -115,7 +115,7 @@ void CScriptGenerator::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId
|
||||||
{
|
{
|
||||||
if (x38_25_inheritTransform)
|
if (x38_25_inheritTransform)
|
||||||
activateActor->SetTransform(followActor->GetTransform());
|
activateActor->SetTransform(followActor->GetTransform());
|
||||||
activateActor->SetTranslation(activateActor->GetTranslation() + x3c_offset);
|
activateActor->SetTranslation(followActor->GetTranslation() + x3c_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
float rnd = stateMgr.GetActiveRandom()->Range(x48_minScale, x4c_maxScale);
|
float rnd = stateMgr.GetActiveRandom()->Range(x48_minScale, x4c_maxScale);
|
||||||
|
|
|
@ -700,17 +700,18 @@ CEntity* ScriptLoader::LoadGenerator(CStateManager& mgr, CInputStream& in, int p
|
||||||
|
|
||||||
std::string name = mgr.HashInstanceName(in);
|
std::string name = mgr.HashInstanceName(in);
|
||||||
|
|
||||||
u32 w1 = in.readUint32Big();
|
u32 spawnCount = in.readUint32Big();
|
||||||
bool b1 = in.readBool();
|
bool reuseFollowers = in.readBool();
|
||||||
bool b2 = in.readBool();
|
bool inheritXf = in.readBool();
|
||||||
|
|
||||||
zeus::CVector3f v1 = zeus::CVector3f::ReadBig(in);
|
zeus::CVector3f offset = zeus::CVector3f::ReadBig(in);
|
||||||
|
|
||||||
bool b3 = in.readBool();
|
bool active = in.readBool();
|
||||||
float f1 = in.readFloatBig();
|
float minScale = in.readFloatBig();
|
||||||
float f2 = in.readFloatBig();
|
float maxScale = in.readFloatBig();
|
||||||
|
|
||||||
return new CScriptGenerator(mgr.AllocateUniqueId(), name, info, w1, b1, v1, b2, b3, f1, f2);
|
return new CScriptGenerator(mgr.AllocateUniqueId(), name, info, spawnCount, reuseFollowers, offset, inheritXf,
|
||||||
|
active, minScale, maxScale);
|
||||||
}
|
}
|
||||||
|
|
||||||
CEntity* ScriptLoader::LoadDock(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
CEntity* ScriptLoader::LoadDock(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
||||||
|
@ -1782,10 +1783,10 @@ CEntity* ScriptLoader::LoadWallCrawlerSwarm(CStateManager& mgr, CInputStream& in
|
||||||
u32 w14 = in.readUint32Big();
|
u32 w14 = in.readUint32Big();
|
||||||
u32 w15 = in.readUint32Big();
|
u32 w15 = in.readUint32Big();
|
||||||
|
|
||||||
return new CWallCrawlerSwarm(mgr.AllocateUniqueId(), active, aHead.x0_name, info,
|
return new CWallCrawlerSwarm(mgr.AllocateUniqueId(), active, aHead.x0_name, info, aHead.x40_scale,
|
||||||
aHead.x40_scale, aHead.x10_transform, w1, CAnimRes(w2, w3, {1.5f}, w4, true), w5, w6,
|
aHead.x10_transform, w1, CAnimRes(w2, w3, {1.5f}, w4, true), w5, w6, w7, w8, w9, w10,
|
||||||
w7, w8, w9, w10, dInfo1, dInfo2, f1, f2, f3, f4, w11, w12, f5, f6, f7, f8, f9, f10,
|
dInfo1, dInfo2, f1, f2, f3, f4, w11, w12, f5, f6, f7, f8, f9, f10, f11, f12, f13, w13,
|
||||||
f11, f12, f13, w13, f14, f15, f16, hInfo, dVulns, w14, w15, aParams);
|
f14, f15, f16, hInfo, dVulns, w14, w15, aParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
CEntity* ScriptLoader::LoadAiJumpPoint(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
CEntity* ScriptLoader::LoadAiJumpPoint(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
||||||
|
|
Loading…
Reference in New Issue