mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-05-13 18:31:21 +00:00
CBouncyGrenade: Element gen renaming
This commit is contained in:
parent
3f49b06070
commit
cc79ba3d09
@ -18,16 +18,16 @@ CBouncyGrenade::CBouncyGrenade(TUniqueId uid, std::string_view name, const CEnti
|
|||||||
, x258_data(data)
|
, x258_data(data)
|
||||||
, x294_numBounces(data.GetNumBounces())
|
, x294_numBounces(data.GetNumBounces())
|
||||||
, x298_parentId(parentId)
|
, x298_parentId(parentId)
|
||||||
, x2a0_elementGen1(std::make_unique<CElementGen>(g_SimplePool->GetObj({'PART', data.GetElementGenId1()})))
|
, x2a0_elementGenCombat(std::make_unique<CElementGen>(g_SimplePool->GetObj({'PART', data.GetElementGenId1()})))
|
||||||
, x2a4_elementGen2(std::make_unique<CElementGen>(g_SimplePool->GetObj({'PART', data.GetElementGenId2()})))
|
, x2a4_elementGenXRay(std::make_unique<CElementGen>(g_SimplePool->GetObj({'PART', data.GetElementGenId2()})))
|
||||||
, x2a8_elementGen3(std::make_unique<CElementGen>(g_SimplePool->GetObj({'PART', data.GetElementGenId3()})))
|
, x2a8_elementGenThermal(std::make_unique<CElementGen>(g_SimplePool->GetObj({'PART', data.GetElementGenId3()})))
|
||||||
, x2ac_elementGen4(std::make_unique<CElementGen>(g_SimplePool->GetObj({'PART', data.GetElementGenId4()})))
|
, x2ac_elementGen4(std::make_unique<CElementGen>(g_SimplePool->GetObj({'PART', data.GetElementGenId4()})))
|
||||||
, x2b0_explodePlayerDistance(explodePlayerDistance) {
|
, x2b0_explodePlayerDistance(explodePlayerDistance) {
|
||||||
SetMomentumWR({0.f, 0.f, -GravityConstant() * GetMass()});
|
SetMomentumWR({0.f, 0.f, -GravityConstant() * GetMass()});
|
||||||
SetVelocityWR(velocity * xf.frontVector());
|
SetVelocityWR(velocity * xf.frontVector());
|
||||||
x2a0_elementGen1->SetParticleEmission(false);
|
x2a0_elementGenCombat->SetParticleEmission(false);
|
||||||
x2a4_elementGen2->SetParticleEmission(false);
|
x2a4_elementGenXRay->SetParticleEmission(false);
|
||||||
x2a8_elementGen3->SetParticleEmission(false);
|
x2a8_elementGenThermal->SetParticleEmission(false);
|
||||||
x2ac_elementGen4->SetParticleEmission(true);
|
x2ac_elementGen4->SetParticleEmission(true);
|
||||||
CMaterialFilter filter = GetMaterialFilter();
|
CMaterialFilter filter = GetMaterialFilter();
|
||||||
filter.ExcludeList().Add(EMaterialTypes::Character);
|
filter.ExcludeList().Add(EMaterialTypes::Character);
|
||||||
@ -42,9 +42,9 @@ void CBouncyGrenade::AddToRenderer(const zeus::CFrustum& frustum, CStateManager&
|
|||||||
}
|
}
|
||||||
const auto visor = mgr.GetPlayerState()->GetActiveVisor(mgr);
|
const auto visor = mgr.GetPlayerState()->GetActiveVisor(mgr);
|
||||||
if (visor == CPlayerState::EPlayerVisor::Combat || visor == CPlayerState::EPlayerVisor::Scan) {
|
if (visor == CPlayerState::EPlayerVisor::Combat || visor == CPlayerState::EPlayerVisor::Scan) {
|
||||||
g_Renderer->AddParticleGen(*x2a0_elementGen1);
|
g_Renderer->AddParticleGen(*x2a0_elementGenCombat);
|
||||||
} else if (visor == CPlayerState::EPlayerVisor::XRay || visor == CPlayerState::EPlayerVisor::Thermal) {
|
} else if (visor == CPlayerState::EPlayerVisor::XRay || visor == CPlayerState::EPlayerVisor::Thermal) {
|
||||||
g_Renderer->AddParticleGen(*x2a8_elementGen3);
|
g_Renderer->AddParticleGen(*x2a8_elementGenThermal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ void CBouncyGrenade::Render(CStateManager& mgr) {
|
|||||||
CElementGen::SetSubtractBlend(true);
|
CElementGen::SetSubtractBlend(true);
|
||||||
CElementGen::SetMoveRedToAlphaBuffer(true);
|
CElementGen::SetMoveRedToAlphaBuffer(true);
|
||||||
CGraphics::SetFog(ERglFogMode::PerspLin, 0.f, 75.f, zeus::skBlack);
|
CGraphics::SetFog(ERglFogMode::PerspLin, 0.f, 75.f, zeus::skBlack);
|
||||||
x2a4_elementGen2->Render();
|
x2a4_elementGenXRay->Render();
|
||||||
mgr.SetupFogForArea(GetAreaIdAlways());
|
mgr.SetupFogForArea(GetAreaIdAlways());
|
||||||
CElementGen::SetSubtractBlend(false);
|
CElementGen::SetSubtractBlend(false);
|
||||||
CElementGen::SetMoveRedToAlphaBuffer(false);
|
CElementGen::SetMoveRedToAlphaBuffer(false);
|
||||||
@ -123,9 +123,9 @@ void CBouncyGrenade::Think(float dt, CStateManager& mgr) {
|
|||||||
};
|
};
|
||||||
if (x2b4_24_exploded) {
|
if (x2b4_24_exploded) {
|
||||||
Stop();
|
Stop();
|
||||||
UpdateElementGen(*x2a0_elementGen1);
|
UpdateElementGen(*x2a0_elementGenCombat);
|
||||||
UpdateElementGen(*x2a4_elementGen2);
|
UpdateElementGen(*x2a4_elementGenXRay);
|
||||||
UpdateElementGen(*x2a8_elementGen3);
|
UpdateElementGen(*x2a8_elementGenThermal);
|
||||||
} else {
|
} else {
|
||||||
UpdateElementGen(*x2ac_elementGen4);
|
UpdateElementGen(*x2ac_elementGen4);
|
||||||
}
|
}
|
||||||
@ -140,8 +140,8 @@ void CBouncyGrenade::Think(float dt, CStateManager& mgr) {
|
|||||||
Explode(mgr, kInvalidUniqueId);
|
Explode(mgr, kInvalidUniqueId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (x2a0_elementGen1->IsSystemDeletable() && x2a4_elementGen2->IsSystemDeletable() &&
|
if (x2a0_elementGenCombat->IsSystemDeletable() && x2a4_elementGenXRay->IsSystemDeletable() &&
|
||||||
x2a8_elementGen3->IsSystemDeletable()) {
|
x2a8_elementGenThermal->IsSystemDeletable()) {
|
||||||
mgr.FreeScriptObject(GetUniqueId());
|
mgr.FreeScriptObject(GetUniqueId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,9 +156,9 @@ void CBouncyGrenade::Explode(CStateManager& mgr, TUniqueId uid) {
|
|||||||
x2b4_24_exploded = true;
|
x2b4_24_exploded = true;
|
||||||
CSfxManager::AddEmitter(x258_data.GetExplodeSfx(), GetTranslation(), zeus::skUp, false, false, 0x7f,
|
CSfxManager::AddEmitter(x258_data.GetExplodeSfx(), GetTranslation(), zeus::skUp, false, false, 0x7f,
|
||||||
GetAreaIdAlways());
|
GetAreaIdAlways());
|
||||||
x2a0_elementGen1->SetParticleEmission(true);
|
x2a0_elementGenCombat->SetParticleEmission(true);
|
||||||
x2a4_elementGen2->SetParticleEmission(true);
|
x2a4_elementGenXRay->SetParticleEmission(true);
|
||||||
x2a8_elementGen3->SetParticleEmission(true);
|
x2a8_elementGenThermal->SetParticleEmission(true);
|
||||||
x2ac_elementGen4->SetParticleEmission(false);
|
x2ac_elementGen4->SetParticleEmission(false);
|
||||||
|
|
||||||
const CDamageInfo& dInfo = x258_data.GetDamageInfo();
|
const CDamageInfo& dInfo = x258_data.GetDamageInfo();
|
||||||
|
@ -64,9 +64,9 @@ private:
|
|||||||
u32 x294_numBounces;
|
u32 x294_numBounces;
|
||||||
TUniqueId x298_parentId;
|
TUniqueId x298_parentId;
|
||||||
float x29c_ = 0.f;
|
float x29c_ = 0.f;
|
||||||
std::unique_ptr<CElementGen> x2a0_elementGen1;
|
std::unique_ptr<CElementGen> x2a0_elementGenCombat;
|
||||||
std::unique_ptr<CElementGen> x2a4_elementGen2;
|
std::unique_ptr<CElementGen> x2a4_elementGenXRay;
|
||||||
std::unique_ptr<CElementGen> x2a8_elementGen3;
|
std::unique_ptr<CElementGen> x2a8_elementGenThermal;
|
||||||
std::unique_ptr<CElementGen> x2ac_elementGen4;
|
std::unique_ptr<CElementGen> x2ac_elementGen4;
|
||||||
float x2b0_explodePlayerDistance;
|
float x2b0_explodePlayerDistance;
|
||||||
bool x2b4_24_exploded : 1 = false;
|
bool x2b4_24_exploded : 1 = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user