mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #297 from lioncash/render
CActor: Make AddToRenderer() non-const
This commit is contained in:
commit
7774bc06ca
|
@ -66,9 +66,10 @@ void CAtomicAlpha::Render(const CStateManager& mgr) const {
|
||||||
x690_bombModel.Render(mgr, locatorXf, x90_actorLights.get(), flags);
|
x690_bombModel.Render(mgr, locatorXf, x90_actorLights.get(), flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void CAtomicAlpha::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CAtomicAlpha::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if (mgr.GetPlayerState()->GetActiveVisor(mgr) != CPlayerState::EPlayerVisor::XRay && x568_25_invisible)
|
if (mgr.GetPlayerState()->GetActiveVisor(mgr) != CPlayerState::EPlayerVisor::XRay && x568_25_invisible) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
CPatterned::AddToRenderer(frustum, mgr);
|
CPatterned::AddToRenderer(frustum, mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
|
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override;
|
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ CBouncyGrenade::CBouncyGrenade(TUniqueId uid, std::string_view name, const CEnti
|
||||||
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(filter.IncludeList(), filter.ExcludeList()));
|
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(filter.IncludeList(), filter.ExcludeList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBouncyGrenade::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CBouncyGrenade::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
if (!x2b4_24_exploded) {
|
if (!x2b4_24_exploded) {
|
||||||
g_Renderer->AddParticleGen(*x2ac_elementGen4);
|
g_Renderer->AddParticleGen(*x2ac_elementGen4);
|
||||||
|
|
|
@ -77,7 +77,7 @@ public:
|
||||||
const SBouncyGrenadeData& data, float velocity, float explodePlayerDistance);
|
const SBouncyGrenadeData& data, float velocity, float explodePlayerDistance);
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override { visitor.Visit(this); }
|
void Accept(IVisitor& visitor) override { visitor.Visit(this); }
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
void CollidedWith(TUniqueId id, const CCollisionInfoList& list, CStateManager& mgr) override;
|
void CollidedWith(TUniqueId id, const CCollisionInfoList& list, CStateManager& mgr) override;
|
||||||
[[nodiscard]] std::optional<zeus::CAABox> GetTouchBounds() const override;
|
[[nodiscard]] std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
|
|
|
@ -56,12 +56,12 @@ CFlaahgraRenderer::CFlaahgraRenderer(TUniqueId uid, TUniqueId owner, std::string
|
||||||
CActorParameters::None(), kInvalidUniqueId)
|
CActorParameters::None(), kInvalidUniqueId)
|
||||||
, xe8_owner(owner) {}
|
, xe8_owner(owner) {}
|
||||||
|
|
||||||
void CFlaahgraRenderer::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CFlaahgraRenderer::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
|
|
||||||
if (const CActor* act = static_cast<const CActor*>(mgr.GetObjectById(xe8_owner))) {
|
if (const CActor* act = static_cast<const CActor*>(mgr.GetObjectById(xe8_owner))) {
|
||||||
if (act->HasModelData() && (act->GetModelData()->HasAnimData() || act->GetModelData()->HasNormalModel()))
|
if (act->HasModelData() && (act->GetModelData()->HasAnimData() || act->GetModelData()->HasNormalModel())) {
|
||||||
act->GetModelData()->RenderParticles(frustum);
|
act->GetModelData()->RenderParticles(frustum);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void CFlaahgraRenderer::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
void CFlaahgraRenderer::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
|
||||||
|
@ -254,14 +254,16 @@ void CFlaahgra::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateM
|
||||||
CPatterned::AcceptScriptMsg(msg, uid, mgr);
|
CPatterned::AcceptScriptMsg(msg, uid, mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFlaahgra::AddToRenderer(const zeus::CFrustum& frustum, const urde::CStateManager& mgr) const {
|
void CFlaahgra::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if ((!GetModelData()->HasAnimData() && !GetModelData()->HasNormalModel()) || xe4_30_outOfFrustum)
|
if ((!GetModelData()->HasAnimData() && !GetModelData()->HasNormalModel()) || xe4_30_outOfFrustum) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (CanRenderUnsorted(mgr))
|
if (CanRenderUnsorted(mgr)) {
|
||||||
Render(mgr);
|
Render(mgr);
|
||||||
else
|
} else {
|
||||||
EnsureRendered(mgr);
|
EnsureRendered(mgr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFlaahgra::Death(CStateManager& mgr, const zeus::CVector3f& dir, EScriptObjectState state) {
|
void CFlaahgra::Death(CStateManager& mgr, const zeus::CVector3f& dir, EScriptObjectState state) {
|
||||||
|
@ -1270,7 +1272,7 @@ void CFlaahgraPlants::Think(float dt, CStateManager& mgr) {
|
||||||
mgr.FreeScriptObject(GetUniqueId());
|
mgr.FreeScriptObject(GetUniqueId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFlaahgraPlants::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CFlaahgraPlants::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
g_Renderer->AddParticleGen(*xe8_elementGen.get());
|
g_Renderer->AddParticleGen(*xe8_elementGen.get());
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ class CFlaahgraRenderer : public CActor {
|
||||||
public:
|
public:
|
||||||
CFlaahgraRenderer(TUniqueId, TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&);
|
CFlaahgraRenderer(TUniqueId, TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&);
|
||||||
|
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Accept(IVisitor&) override;
|
void Accept(IVisitor&) override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override { return {}; }
|
std::optional<zeus::CAABox> GetTouchBounds() const override { return {}; }
|
||||||
};
|
};
|
||||||
|
@ -80,7 +80,7 @@ public:
|
||||||
void Accept(IVisitor&) override;
|
void Accept(IVisitor&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override { return x110_aabox; }
|
std::optional<zeus::CAABox> GetTouchBounds() const override { return x110_aabox; }
|
||||||
void Touch(CActor&, CStateManager&) override;
|
void Touch(CActor&, CStateManager&) override;
|
||||||
};
|
};
|
||||||
|
@ -200,7 +200,7 @@ public:
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void PreThink(float, CStateManager&) override;
|
void PreThink(float, CStateManager&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
bool CanRenderUnsorted(const CStateManager&) const override { return true; }
|
bool CanRenderUnsorted(const CStateManager&) const override { return true; }
|
||||||
zeus::CVector3f GetAimPosition(const CStateManager&, float) const override { return x820_; }
|
zeus::CVector3f GetAimPosition(const CStateManager&, float) const override { return x820_; }
|
||||||
void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override;
|
void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override;
|
||||||
|
|
|
@ -463,7 +463,7 @@ void CFlyingPirate::RemoveFromTeam(CStateManager& mgr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFlyingPirate::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CFlyingPirate::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
for (const auto& gen : x684_particleGens) {
|
for (const auto& gen : x684_particleGens) {
|
||||||
if (frustum.aabbFrustumTest(GetBoundingBox())) {
|
if (frustum.aabbFrustumTest(GetBoundingBox())) {
|
||||||
g_Renderer->AddParticleGen(*gen);
|
g_Renderer->AddParticleGen(*gen);
|
||||||
|
|
|
@ -84,7 +84,7 @@ public:
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override { visitor.Visit(this); }
|
void Accept(IVisitor& visitor) override { visitor.Visit(this); }
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
bool AnimOver(CStateManager& mgr, float arg) override;
|
bool AnimOver(CStateManager& mgr, float arg) override;
|
||||||
void CalculateRenderBounds() override;
|
void CalculateRenderBounds() override;
|
||||||
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override;
|
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override;
|
||||||
|
|
|
@ -117,7 +117,7 @@ void CGrenadeLauncher::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGrenadeLauncher::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CGrenadeLauncher::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ public:
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override { visitor.Visit(this); }
|
void Accept(IVisitor& visitor) override { visitor.Visit(this); }
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
[[nodiscard]] const CCollisionPrimitive* GetCollisionPrimitive() const override { return &x328_cSphere; }
|
[[nodiscard]] const CCollisionPrimitive* GetCollisionPrimitive() const override { return &x328_cSphere; }
|
||||||
[[nodiscard]] const CDamageVulnerability* GetDamageVulnerability() const override { return &x264_vulnerability; }
|
[[nodiscard]] const CDamageVulnerability* GetDamageVulnerability() const override { return &x264_vulnerability; }
|
||||||
[[nodiscard]] std::optional<zeus::CAABox> GetTouchBounds() const override;
|
[[nodiscard]] std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
|
|
|
@ -170,7 +170,7 @@ void CMetroidBeta::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CSta
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void CMetroidBeta::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CMetroidBeta::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
CPatterned::AddToRenderer(frustum, mgr);
|
CPatterned::AddToRenderer(frustum, mgr);
|
||||||
}
|
}
|
||||||
void CMetroidBeta::Render(const CStateManager& mgr) const { CPatterned::Render(mgr); }
|
void CMetroidBeta::Render(const CStateManager& mgr) const { CPatterned::Render(mgr); }
|
||||||
|
|
|
@ -102,7 +102,7 @@ public:
|
||||||
|
|
||||||
void Think(float dt, CStateManager& mgr) override;
|
void Think(float dt, CStateManager& mgr) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
const CDamageVulnerability* GetDamageVulnerability() const override;
|
const CDamageVulnerability* GetDamageVulnerability() const override;
|
||||||
const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f& vec1, const zeus::CVector3f& vec2,
|
const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f& vec1, const zeus::CVector3f& vec2,
|
||||||
|
|
|
@ -303,7 +303,7 @@ void CNewIntroBoss::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& nod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNewIntroBoss::AddToRenderer(const zeus::CFrustum&, const CStateManager& mgr) const { EnsureRendered(mgr); }
|
void CNewIntroBoss::AddToRenderer(const zeus::CFrustum&, CStateManager& mgr) { EnsureRendered(mgr); }
|
||||||
|
|
||||||
float CNewIntroBoss::GetNextAttackTime(CStateManager& mgr) const {
|
float CNewIntroBoss::GetNextAttackTime(CStateManager& mgr) const {
|
||||||
float attackTime = 2.f * mgr.GetActiveRandom()->Float() + 6.f;
|
float attackTime = 2.f * mgr.GetActiveRandom()->Float() + 6.f;
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager&) override;
|
||||||
void Think(float dt, CStateManager& mgr) override;
|
void Think(float dt, CStateManager& mgr) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void OnScanStateChanged(EScanState, CStateManager&) override;
|
void OnScanStateChanged(EScanState, CStateManager&) override;
|
||||||
CProjectileInfo* GetProjectileInfo() override { return &x5ac_projectileInfo; }
|
CProjectileInfo* GetProjectileInfo() override { return &x5ac_projectileInfo; }
|
||||||
zeus::CAABox GetSortingBounds(const CStateManager&) const override {
|
zeus::CAABox GetSortingBounds(const CStateManager&) const override {
|
||||||
|
|
|
@ -697,7 +697,7 @@ void CRidley::Render(const CStateManager& mgr) const {
|
||||||
CPatterned::Render(mgr);
|
CPatterned::Render(mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRidley::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CRidley::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
CPatterned::AddToRenderer(frustum, mgr);
|
CPatterned::AddToRenderer(frustum, mgr);
|
||||||
if (xce0_ && frustum.aabbFrustumTest(*xce0_->GetBounds())) {
|
if (xce0_ && frustum.aabbFrustumTest(*xce0_->GetBounds())) {
|
||||||
g_Renderer->AddParticleGen(*xce0_);
|
g_Renderer->AddParticleGen(*xce0_);
|
||||||
|
|
|
@ -207,7 +207,7 @@ public:
|
||||||
void Think(float dt, CStateManager& mgr) override;
|
void Think(float dt, CStateManager& mgr) override;
|
||||||
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
zeus::CAABox GetSortingBounds(const CStateManager&) const override { return GetBoundingBox(); }
|
zeus::CAABox GetSortingBounds(const CStateManager&) const override { return GetBoundingBox(); }
|
||||||
const CDamageVulnerability* GetDamageVulnerability() const override {
|
const CDamageVulnerability* GetDamageVulnerability() const override {
|
||||||
return &CDamageVulnerability::ImmuneVulnerabilty();
|
return &CDamageVulnerability::ImmuneVulnerabilty();
|
||||||
|
|
|
@ -53,7 +53,7 @@ void CShockWave::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CState
|
||||||
mgr.SendScriptMsgAlways(x980_id2, uid, msg);
|
mgr.SendScriptMsgAlways(x980_id2, uid, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CShockWave::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CShockWave::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
g_Renderer->AddParticleGen(*x110_elementGen);
|
g_Renderer->AddParticleGen(*x110_elementGen);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
[[nodiscard]] std::optional<zeus::CAABox> GetTouchBounds() const override;
|
[[nodiscard]] std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
void Think(float dt, CStateManager& mgr) override;
|
void Think(float dt, CStateManager& mgr) override;
|
||||||
|
|
|
@ -114,7 +114,7 @@ void CBomb::Think(float dt, urde::CStateManager& mgr) {
|
||||||
x184_particle2->SetGlobalTranslation(GetTranslation());
|
x184_particle2->SetGlobalTranslation(GetTranslation());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBomb::AddToRenderer(const zeus::CFrustum& frustum, const urde::CStateManager& mgr) const {
|
void CBomb::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
zeus::CVector3f origin = GetTranslation();
|
zeus::CVector3f origin = GetTranslation();
|
||||||
float ballRadius = mgr.GetPlayer().GetMorphBall()->GetBallRadius();
|
float ballRadius = mgr.GetPlayer().GetMorphBall()->GetBallRadius();
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
void Accept(IVisitor&) override;
|
void Accept(IVisitor&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override {}
|
void Render(const CStateManager&) const override {}
|
||||||
void Touch(CActor&, CStateManager&) override;
|
void Touch(CActor&, CStateManager&) override;
|
||||||
void Explode(const zeus::CVector3f&, CStateManager&);
|
void Explode(const zeus::CVector3f&, CStateManager&);
|
||||||
|
|
|
@ -217,7 +217,7 @@ void CEnergyProjectile::Render(const CStateManager& mgr) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEnergyProjectile::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CEnergyProjectile::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
auto bounds = x170_projectile.GetBounds();
|
auto bounds = x170_projectile.GetBounds();
|
||||||
if (bounds && !frustum.aabbFrustumTest(*bounds))
|
if (bounds && !frustum.aabbFrustumTest(*bounds))
|
||||||
return;
|
return;
|
||||||
|
@ -225,8 +225,9 @@ void CEnergyProjectile::AddToRenderer(const zeus::CFrustum& frustum, const CStat
|
||||||
CPlayerState::EPlayerVisor visor = mgr.GetPlayerState()->GetActiveVisor(mgr);
|
CPlayerState::EPlayerVisor visor = mgr.GetPlayerState()->GetActiveVisor(mgr);
|
||||||
if (visor != CPlayerState::EPlayerVisor::XRay &&
|
if (visor != CPlayerState::EPlayerVisor::XRay &&
|
||||||
((xe8_projectileAttribs & EProjectileAttrib::Ice) != EProjectileAttrib::Ice ||
|
((xe8_projectileAttribs & EProjectileAttrib::Ice) != EProjectileAttrib::Ice ||
|
||||||
mgr.GetThermalDrawFlag() != EThermalDrawFlag::Hot))
|
mgr.GetThermalDrawFlag() != EThermalDrawFlag::Hot)) {
|
||||||
x170_projectile.AddToRenderer();
|
x170_projectile.AddToRenderer();
|
||||||
|
}
|
||||||
EnsureRendered(mgr);
|
EnsureRendered(mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
void ResolveCollisionWithActor(const CRayCastResult& res, CActor& act, CStateManager& mgr);
|
void ResolveCollisionWithActor(const CRayCastResult& res, CActor& act, CStateManager& mgr);
|
||||||
void Think(float dt, CStateManager& mgr);
|
void Think(float dt, CStateManager& mgr);
|
||||||
void Render(const CStateManager& mgr) const;
|
void Render(const CStateManager& mgr) const;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr);
|
||||||
void Touch(CActor& act, CStateManager& mgr);
|
void Touch(CActor& act, CStateManager& mgr);
|
||||||
virtual bool Explode(const zeus::CVector3f& pos, const zeus::CVector3f& normal, EWeaponCollisionResponseTypes type,
|
virtual bool Explode(const zeus::CVector3f& pos, const zeus::CVector3f& normal, EWeaponCollisionResponseTypes type,
|
||||||
CStateManager& mgr, const CDamageVulnerability& dVuln, TUniqueId hitActor);
|
CStateManager& mgr, const CDamageVulnerability& dVuln, TUniqueId hitActor);
|
||||||
|
|
|
@ -90,7 +90,7 @@ void CFlameThrower::CreateFlameParticles(CStateManager& mgr) {
|
||||||
CreateProjectileLight("FlameThrower_Light"sv, x348_flameGen->GetLight(), mgr);
|
CreateProjectileLight("FlameThrower_Light"sv, x348_flameGen->GetLight(), mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFlameThrower::AddToRenderer(const zeus::CFrustum&, const CStateManager& mgr) const {
|
void CFlameThrower::AddToRenderer(const zeus::CFrustum&, CStateManager& mgr) {
|
||||||
g_Renderer->AddParticleGen(*x348_flameGen);
|
g_Renderer->AddParticleGen(*x348_flameGen);
|
||||||
EnsureRendered(mgr, x2e8_flameXf.origin, GetRenderBounds());
|
EnsureRendered(mgr, x2e8_flameXf.origin, GetRenderBounds());
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
void Touch(CActor& actor, CStateManager& mgr) override;
|
void Touch(CActor& actor, CStateManager& mgr) override;
|
||||||
|
|
|
@ -394,7 +394,7 @@ bool CPlasmaProjectile::CanRenderUnsorted(const CStateManager& mgr) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlasmaProjectile::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CPlasmaProjectile::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if (GetActive()) {
|
if (GetActive()) {
|
||||||
g_Renderer->AddParticleGen(*x518_contactGen);
|
g_Renderer->AddParticleGen(*x518_contactGen);
|
||||||
if (x478_beamAttributes & 0x2) {
|
if (x478_beamAttributes & 0x2) {
|
||||||
|
|
|
@ -121,7 +121,7 @@ public:
|
||||||
void Fire(const zeus::CTransform& xf, CStateManager& mgr, bool b) override;
|
void Fire(const zeus::CTransform& xf, CStateManager& mgr, bool b) override;
|
||||||
void Touch(CActor& other, CStateManager& mgr) override;
|
void Touch(CActor& other, CStateManager& mgr) override;
|
||||||
bool CanRenderUnsorted(const CStateManager& mgr) const override;
|
bool CanRenderUnsorted(const CStateManager& mgr) const override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
};
|
};
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
|
@ -89,7 +89,7 @@ void CPowerBomb::Think(float dt, CStateManager& mgr) {
|
||||||
x15c_curTime += dt;
|
x15c_curTime += dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPowerBomb::AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {
|
void CPowerBomb::AddToRenderer(const zeus::CFrustum&, CStateManager&) {
|
||||||
g_Renderer->AddParticleGen(*x168_particle);
|
g_Renderer->AddParticleGen(*x168_particle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override {}
|
void Render(const CStateManager&) const override {}
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override { return std::nullopt; }
|
std::optional<zeus::CAABox> GetTouchBounds() const override { return std::nullopt; }
|
||||||
void Touch(CActor&, CStateManager&) override { /*x158_24_canStartFilter; */
|
void Touch(CActor&, CStateManager&) override { /*x158_24_canStartFilter; */
|
||||||
|
|
|
@ -181,25 +181,29 @@ void CActor::PreRender(CStateManager& mgr, const zeus::CFrustum& planes) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CActor::AddToRenderer(const zeus::CFrustum& planes, const CStateManager& mgr) const {
|
void CActor::AddToRenderer(const zeus::CFrustum& planes, CStateManager& mgr) {
|
||||||
if (!x64_modelData || x64_modelData->IsNull())
|
if (!x64_modelData || x64_modelData->IsNull()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (xe6_29_renderParticleDBInside)
|
if (xe6_29_renderParticleDBInside) {
|
||||||
x64_modelData->RenderParticles(planes);
|
x64_modelData->RenderParticles(planes);
|
||||||
|
}
|
||||||
|
|
||||||
if (!xe4_30_outOfFrustum) {
|
if (!xe4_30_outOfFrustum) {
|
||||||
if (CanRenderUnsorted(mgr))
|
if (CanRenderUnsorted(mgr)) {
|
||||||
Render(mgr);
|
Render(mgr);
|
||||||
else
|
} else {
|
||||||
EnsureRendered(mgr);
|
EnsureRendered(mgr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mgr.GetPlayerState()->GetActiveVisor(mgr) != CPlayerState::EPlayerVisor::XRay &&
|
if (mgr.GetPlayerState()->GetActiveVisor(mgr) != CPlayerState::EPlayerVisor::XRay &&
|
||||||
mgr.GetPlayerState()->GetActiveVisor(mgr) != CPlayerState::EPlayerVisor::Thermal && xe5_24_shadowEnabled &&
|
mgr.GetPlayerState()->GetActiveVisor(mgr) != CPlayerState::EPlayerVisor::Thermal && xe5_24_shadowEnabled &&
|
||||||
x94_simpleShadow->Valid() && planes.aabbFrustumTest(x94_simpleShadow->GetBounds()))
|
x94_simpleShadow->Valid() && planes.aabbFrustumTest(x94_simpleShadow->GetBounds())) {
|
||||||
g_Renderer->AddDrawable(x94_simpleShadow.get(), x94_simpleShadow->GetTransform().origin,
|
g_Renderer->AddDrawable(x94_simpleShadow.get(), x94_simpleShadow->GetTransform().origin,
|
||||||
x94_simpleShadow->GetBounds(), 1, CBooRenderer::EDrawableSorting::SortedCallback);
|
x94_simpleShadow->GetBounds(), 1, CBooRenderer::EDrawableSorting::SortedCallback);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CActor::DrawTouchBounds() const {
|
void CActor::DrawTouchBounds() const {
|
||||||
|
|
|
@ -108,7 +108,7 @@ public:
|
||||||
CEntity::SetActive(active);
|
CEntity::SetActive(active);
|
||||||
}
|
}
|
||||||
virtual void PreRender(CStateManager&, const zeus::CFrustum&);
|
virtual void PreRender(CStateManager&, const zeus::CFrustum&);
|
||||||
virtual void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const;
|
virtual void AddToRenderer(const zeus::CFrustum&, CStateManager&);
|
||||||
virtual void Render(const CStateManager&) const;
|
virtual void Render(const CStateManager&) const;
|
||||||
virtual bool CanRenderUnsorted(const CStateManager&) const;
|
virtual bool CanRenderUnsorted(const CStateManager&) const;
|
||||||
virtual void CalculateRenderBounds();
|
virtual void CalculateRenderBounds();
|
||||||
|
|
|
@ -8,7 +8,7 @@ class CEffect : public CActor {
|
||||||
public:
|
public:
|
||||||
CEffect(TUniqueId uid, const CEntityInfo& info, bool active, std::string_view name, const zeus::CTransform& xf);
|
CEffect(TUniqueId uid, const CEntityInfo& info, bool active, std::string_view name, const zeus::CTransform& xf);
|
||||||
|
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {}
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}
|
||||||
void Render(const CStateManager&) const override {}
|
void Render(const CStateManager&) const override {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -89,9 +89,10 @@ void CExplosion::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) {
|
||||||
xe4_30_outOfFrustum = !xf4_25_ || !frustum.aabbFrustumTest(x9c_renderBounds);
|
xe4_30_outOfFrustum = !xf4_25_ || !frustum.aabbFrustumTest(x9c_renderBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CExplosion::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CExplosion::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if (xe4_30_outOfFrustum)
|
if (xe4_30_outOfFrustum) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(xf4_24_renderThermalHot && mgr.GetThermalDrawFlag() == EThermalDrawFlag::Hot) &&
|
if (!(xf4_24_renderThermalHot && mgr.GetThermalDrawFlag() == EThermalDrawFlag::Hot) &&
|
||||||
!(xf4_26_renderXray && mgr.GetPlayerState()->GetActiveVisor(mgr) == CPlayerState::EPlayerVisor::XRay)) {
|
!(xf4_26_renderXray && mgr.GetPlayerState()->GetActiveVisor(mgr) == CPlayerState::EPlayerVisor::XRay)) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
bool CanRenderUnsorted(const CStateManager&) const override;
|
bool CanRenderUnsorted(const CStateManager&) const override;
|
||||||
};
|
};
|
||||||
|
|
|
@ -84,7 +84,7 @@ void CFire::Touch(CActor& act, CStateManager& mgr) {
|
||||||
CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), {});
|
CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFire::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CFire::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
bool drawParticles = true;
|
bool drawParticles = true;
|
||||||
if (!x148_27_) {
|
if (!x148_27_) {
|
||||||
using EPlayerVisor = CPlayerState::EPlayerVisor;
|
using EPlayerVisor = CPlayerState::EPlayerVisor;
|
||||||
|
|
|
@ -42,6 +42,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void Touch(CActor&, CStateManager&) override;
|
void Touch(CActor&, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
};
|
};
|
||||||
} // namespace urde
|
} // namespace urde
|
|
@ -78,7 +78,7 @@ void CHUDBillboardEffect::Think(float dt, CStateManager& mgr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHUDBillboardEffect::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CHUDBillboardEffect::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if (x104_25_enableRender && x104_24_renderAsParticleGen) {
|
if (x104_25_enableRender && x104_24_renderAsParticleGen) {
|
||||||
g_Renderer->AddParticleGen(*xe8_generator);
|
g_Renderer->AddParticleGen(*xe8_generator);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ public:
|
||||||
~CHUDBillboardEffect() override;
|
~CHUDBillboardEffect() override;
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void Think(float dt, CStateManager& mgr) override;
|
void Think(float dt, CStateManager& mgr) override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
bool IsElementGen() const { return x104_26_isElementGen; }
|
bool IsElementGen() const { return x104_26_isElementGen; }
|
||||||
|
|
|
@ -1570,15 +1570,16 @@ void CPatterned::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) {
|
||||||
CActor::PreRender(mgr, frustum);
|
CActor::PreRender(mgr, frustum);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPatterned::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CPatterned::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if (x402_29_drawParticles) {
|
if (x402_29_drawParticles) {
|
||||||
if (x64_modelData && !x64_modelData->IsNull()) {
|
if (x64_modelData && !x64_modelData->IsNull()) {
|
||||||
int mask, target;
|
int mask, target;
|
||||||
mgr.GetCharacterRenderMaskAndTarget(x402_31_thawed, mask, target);
|
mgr.GetCharacterRenderMaskAndTarget(x402_31_thawed, mask, target);
|
||||||
if (CAnimData* aData = x64_modelData->GetAnimationData())
|
if (CAnimData* aData = x64_modelData->GetAnimationData()) {
|
||||||
aData->GetParticleDB().AddToRendererClippedMasked(frustum, mask, target);
|
aData->GetParticleDB().AddToRendererClippedMasked(frustum, mask, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ public:
|
||||||
}
|
}
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
|
|
||||||
void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr) override;
|
void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr) override;
|
||||||
|
|
|
@ -1597,7 +1597,7 @@ void CPlayer::CalculateRenderBounds() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CPlayer::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if (x2f4_cameraState != EPlayerCameraState::FirstPerson && x2f8_morphBallState == EPlayerMorphBallState::Morphed) {
|
if (x2f4_cameraState != EPlayerCameraState::FirstPerson && x2f8_morphBallState == EPlayerMorphBallState::Morphed) {
|
||||||
if (x768_morphball->IsInFrustum(frustum)) {
|
if (x768_morphball->IsInFrustum(frustum)) {
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
|
|
|
@ -405,7 +405,7 @@ public:
|
||||||
void RenderReflectedPlayer(CStateManager& mgr);
|
void RenderReflectedPlayer(CStateManager& mgr);
|
||||||
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
||||||
void CalculateRenderBounds() override;
|
void CalculateRenderBounds() override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
void ComputeFreeLook(const CFinalInput& input);
|
void ComputeFreeLook(const CFinalInput& input);
|
||||||
void UpdateFreeLookState(const CFinalInput& input, float dt, CStateManager& mgr);
|
void UpdateFreeLookState(const CFinalInput& input, float dt, CStateManager& mgr);
|
||||||
void UpdateFreeLook(float dt);
|
void UpdateFreeLook(float dt);
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {}
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}
|
||||||
void Render(const CStateManager&) const override {}
|
void Render(const CStateManager&) const override {}
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
bool GetInUse(TUniqueId uid) const;
|
bool GetInUse(TUniqueId uid) const;
|
||||||
|
|
|
@ -17,7 +17,7 @@ public:
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {}
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}
|
||||||
void Render(const CStateManager&) const override {}
|
void Render(const CStateManager&) const override {}
|
||||||
TUniqueId GetRandomNextWaypointId(CStateManager& mgr) const;
|
TUniqueId GetRandomNextWaypointId(CStateManager& mgr) const;
|
||||||
float GetHFov() const { return xe8_hfov; }
|
float GetHFov() const { return xe8_hfov; }
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {}
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override {}
|
void Render(const CStateManager&) const override {}
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
|
|
|
@ -116,9 +116,11 @@ void CScriptDamageableTrigger::Render(const CStateManager& mgr) const {
|
||||||
CActor::Render(mgr);
|
CActor::Render(mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptDamageableTrigger::AddToRenderer(const zeus::CFrustum& /*frustum*/, const CStateManager& mgr) const {
|
void CScriptDamageableTrigger::AddToRenderer(const zeus::CFrustum& /*frustum*/, CStateManager& mgr) {
|
||||||
if (x300_26_outOfFrustum)
|
if (x300_26_outOfFrustum) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EnsureRendered(mgr, GetTranslation() - x244_faceTranslate, GetSortingBounds(mgr));
|
EnsureRendered(mgr, GetTranslation() - x244_faceTranslate, GetSortingBounds(mgr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
||||||
const CWeaponMode&, EProjectileAttrib) const override;
|
const CWeaponMode&, EProjectileAttrib) const override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
||||||
const CDamageVulnerability* GetDamageVulnerability() const override { return &x174_dVuln; }
|
const CDamageVulnerability* GetDamageVulnerability() const override { return &x174_dVuln; }
|
||||||
CHealthInfo* HealthInfo(CStateManager&) override { return &x16c_hInfo; }
|
CHealthInfo* HealthInfo(CStateManager&) override { return &x16c_hInfo; }
|
||||||
|
|
|
@ -143,21 +143,28 @@ CScriptDebris::CScriptDebris(TUniqueId uid, std::string_view name, const CEntity
|
||||||
|
|
||||||
void CScriptDebris::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
void CScriptDebris::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
|
||||||
void CScriptDebris::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CScriptDebris::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if (x2d4_particleGens[0])
|
if (x2d4_particleGens[0]) {
|
||||||
if (x270_curTime < x274_duration || x281_26_deferDeleteTillParticle1Done)
|
if (x270_curTime < x274_duration || x281_26_deferDeleteTillParticle1Done) {
|
||||||
g_Renderer->AddParticleGen(*x2d4_particleGens[0]);
|
g_Renderer->AddParticleGen(*x2d4_particleGens[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (x2d4_particleGens[1])
|
if (x2d4_particleGens[1]) {
|
||||||
if (x270_curTime < x274_duration || x281_28_deferDeleteTillParticle2Done)
|
if (x270_curTime < x274_duration || x281_28_deferDeleteTillParticle2Done) {
|
||||||
g_Renderer->AddParticleGen(*x2d4_particleGens[1]);
|
g_Renderer->AddParticleGen(*x2d4_particleGens[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (x281_29_particle3Active)
|
if (x281_29_particle3Active) {
|
||||||
g_Renderer->AddParticleGen(*x2d4_particleGens[2]);
|
g_Renderer->AddParticleGen(*x2d4_particleGens[2]);
|
||||||
|
}
|
||||||
|
|
||||||
if (x64_modelData && !x64_modelData->IsNull())
|
if (x64_modelData && !x64_modelData->IsNull()) {
|
||||||
if (x270_curTime < x274_duration)
|
if (x270_curTime < x274_duration) {
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static zeus::CVector3f debris_cone(CStateManager& mgr, float coneAng, float minMag, float maxMag) {
|
static zeus::CVector3f debris_cone(CStateManager& mgr, float coneAng, float minMag, float maxMag) {
|
||||||
|
|
|
@ -78,7 +78,7 @@ public:
|
||||||
bool noBounce, bool active);
|
bool noBounce, bool active);
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override;
|
||||||
void Think(float dt, CStateManager& mgr) override;
|
void Think(float dt, CStateManager& mgr) override;
|
||||||
void Touch(CActor& other, CStateManager& mgr) override;
|
void Touch(CActor& other, CStateManager& mgr) override;
|
||||||
|
|
|
@ -197,8 +197,11 @@ void CScriptDoor::Think(float dt, CStateManager& mgr) {
|
||||||
xe7_31_targetable = mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Scan;
|
xe7_31_targetable = mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Scan;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptDoor::AddToRenderer(const zeus::CFrustum& /*frustum*/, const CStateManager& mgr) const {
|
void CScriptDoor::AddToRenderer(const zeus::CFrustum& /*frustum*/, CStateManager& mgr) {
|
||||||
if (!xe4_30_outOfFrustum)
|
if (xe4_30_outOfFrustum) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CPhysicsActor::Render(mgr);
|
CPhysicsActor::Render(mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||||
void Think(float, CStateManager& mgr) override;
|
void Think(float, CStateManager& mgr) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager& mgr) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager& mgr) override;
|
||||||
void Render(const CStateManager&) const override {}
|
void Render(const CStateManager&) const override {}
|
||||||
void ForceClosed(CStateManager&);
|
void ForceClosed(CStateManager&);
|
||||||
bool IsConnectedToArea(const CStateManager& mgr, TAreaId area) const;
|
bool IsConnectedToArea(const CStateManager& mgr, TAreaId area) const;
|
||||||
|
|
|
@ -55,10 +55,11 @@ void CScriptEMPulse::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptEMPulse::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CScriptEMPulse::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
if (GetActive())
|
if (GetActive()) {
|
||||||
g_Renderer->AddParticleGen(*x114_particleGen);
|
g_Renderer->AddParticleGen(*x114_particleGen);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptEMPulse::CalculateRenderBounds() { x9c_renderBounds = CalculateBoundingBox(); }
|
void CScriptEMPulse::CalculateRenderBounds() { x9c_renderBounds = CalculateBoundingBox(); }
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
void Accept(IVisitor&) override;
|
void Accept(IVisitor&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void CalculateRenderBounds() override;
|
void CalculateRenderBounds() override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
void Touch(CActor&, CStateManager&) override;
|
void Touch(CActor&, CStateManager&) override;
|
||||||
|
|
|
@ -207,31 +207,33 @@ void CScriptEffect::PreRender(CStateManager& mgr, const zeus::CFrustum&) {
|
||||||
x13c_triggerId = kInvalidUniqueId;
|
x13c_triggerId = kInvalidUniqueId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptEffect::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CScriptEffect::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if (!x111_26_canRender) {
|
if (!x111_26_canRender) {
|
||||||
const_cast<CScriptEffect&>(*this).x12c_remTime = zeus::max(x12c_remTime, x134_durationResetWhileVisible);
|
x12c_remTime = zeus::max(x12c_remTime, x134_durationResetWhileVisible);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!frustum.aabbFrustumTest(x9c_renderBounds))
|
if (!frustum.aabbFrustumTest(x9c_renderBounds)) {
|
||||||
return;
|
return;
|
||||||
const_cast<CScriptEffect&>(*this).x12c_remTime = zeus::max(x12c_remTime, x134_durationResetWhileVisible);
|
}
|
||||||
|
x12c_remTime = zeus::max(x12c_remTime, x134_durationResetWhileVisible);
|
||||||
|
|
||||||
if (x110_31_anyVisorVisible) {
|
if (x110_31_anyVisorVisible) {
|
||||||
bool visible = false;
|
bool visible = false;
|
||||||
const CPlayerState::EPlayerVisor visor = mgr.GetPlayerState()->GetActiveVisor(mgr);
|
const CPlayerState::EPlayerVisor visor = mgr.GetPlayerState()->GetActiveVisor(mgr);
|
||||||
if (visor == CPlayerState::EPlayerVisor::Combat || visor == CPlayerState::EPlayerVisor::Scan)
|
if (visor == CPlayerState::EPlayerVisor::Combat || visor == CPlayerState::EPlayerVisor::Scan) {
|
||||||
visible = x110_28_combatVisorVisible;
|
visible = x110_28_combatVisorVisible;
|
||||||
else if (visor == CPlayerState::EPlayerVisor::XRay)
|
} else if (visor == CPlayerState::EPlayerVisor::XRay) {
|
||||||
visible = x110_30_xrayVisorVisible;
|
visible = x110_30_xrayVisorVisible;
|
||||||
else if (visor == CPlayerState::EPlayerVisor::Thermal)
|
} else if (visor == CPlayerState::EPlayerVisor::Thermal) {
|
||||||
visible = x110_29_thermalVisorVisible;
|
visible = x110_29_thermalVisorVisible;
|
||||||
|
}
|
||||||
|
|
||||||
if (visible && x138_actorLights) {
|
if (visible && x138_actorLights) {
|
||||||
const CGameArea* area = mgr.GetWorld()->GetAreaAlways(GetAreaIdAlways());
|
const CGameArea* area = mgr.GetWorld()->GetAreaAlways(GetAreaIdAlways());
|
||||||
const_cast<CScriptEffect&>(*this).x138_actorLights->BuildAreaLightList(
|
x138_actorLights->BuildAreaLightList(
|
||||||
mgr, *area, zeus::CAABox{x9c_renderBounds.center(), x9c_renderBounds.center()});
|
mgr, *area, zeus::CAABox{x9c_renderBounds.center(), x9c_renderBounds.center()});
|
||||||
const_cast<CScriptEffect&>(*this).x138_actorLights->BuildDynamicLightList(mgr, x9c_renderBounds);
|
x138_actorLights->BuildDynamicLightList(mgr, x9c_renderBounds);
|
||||||
}
|
}
|
||||||
EnsureRendered(mgr);
|
EnsureRendered(mgr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
bool CanRenderUnsorted(const CStateManager&) const override { return false; }
|
bool CanRenderUnsorted(const CStateManager&) const override { return false; }
|
||||||
|
|
|
@ -46,7 +46,7 @@ void CScriptGrapplePoint::Render(const CStateManager&) const {
|
||||||
|
|
||||||
std::optional<zeus::CAABox> CScriptGrapplePoint::GetTouchBounds() const { return {xe8_touchBounds}; }
|
std::optional<zeus::CAABox> CScriptGrapplePoint::GetTouchBounds() const { return {xe8_touchBounds}; }
|
||||||
|
|
||||||
void CScriptGrapplePoint::AddToRenderer(const zeus::CFrustum&, const CStateManager& mgr) const {
|
void CScriptGrapplePoint::AddToRenderer(const zeus::CFrustum&, CStateManager& mgr) {
|
||||||
CActor::EnsureRendered(mgr);
|
CActor::EnsureRendered(mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
const CGrappleParameters& GetGrappleParameters() const { return x100_parameters; }
|
const CGrappleParameters& GetGrappleParameters() const { return x100_parameters; }
|
||||||
};
|
};
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
|
@ -444,11 +444,12 @@ void CScriptGunTurret::PlayAdditiveFlinchAnimation(CStateManager& mgr) {
|
||||||
GetModelData()->GetAnimationData()->AddAdditiveAnimation(pair.second, 1.f, false, true);
|
GetModelData()->GetAnimationData()->AddAdditiveAnimation(pair.second, 1.f, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptGunTurret::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CScriptGunTurret::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
|
|
||||||
if (x258_type != ETurretComponent::Gun)
|
if (x258_type != ETurretComponent::Gun) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!x560_25_frozen) {
|
if (!x560_25_frozen) {
|
||||||
switch (x520_state) {
|
switch (x520_state) {
|
||||||
|
@ -471,8 +472,9 @@ void CScriptGunTurret::AddToRenderer(const zeus::CFrustum& frustum, const CState
|
||||||
case ETurretState::ExitTargeting:
|
case ETurretState::ExitTargeting:
|
||||||
case ETurretState::Frenzy:
|
case ETurretState::Frenzy:
|
||||||
g_Renderer->AddParticleGen(*x478_targettingLight);
|
g_Renderer->AddParticleGen(*x478_targettingLight);
|
||||||
if (x520_state == ETurretState::Firing || x520_state == ETurretState::Frenzy)
|
if (x520_state == ETurretState::Firing || x520_state == ETurretState::Frenzy) {
|
||||||
g_Renderer->AddParticleGen(*x488_chargingEffect);
|
g_Renderer->AddParticleGen(*x488_chargingEffect);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -227,7 +227,7 @@ public:
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void Touch(CActor&, CStateManager&) override;
|
void Touch(CActor&, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
zeus::CVector3f GetOrbitPosition(const CStateManager&) const override;
|
zeus::CVector3f GetOrbitPosition(const CStateManager&) const override;
|
||||||
|
|
|
@ -368,10 +368,11 @@ void CScriptPlayerActor::PreRender(CStateManager& mgr, const zeus::CFrustum& fru
|
||||||
CScriptActor::PreRender(mgr, frustum);
|
CScriptActor::PreRender(mgr, frustum);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptPlayerActor::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CScriptPlayerActor::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
const_cast<CScriptPlayerActor*>(this)->TouchModels_Internal(mgr);
|
TouchModels_Internal(mgr);
|
||||||
if (GetActive())
|
if (GetActive()) {
|
||||||
CActor::AddToRenderer(frustum, mgr);
|
CActor::AddToRenderer(frustum, mgr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptPlayerActor::Render(const CStateManager& mgr) const {
|
void CScriptPlayerActor::Render(const CStateManager& mgr) const {
|
||||||
|
|
|
@ -67,7 +67,7 @@ public:
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void SetActive(bool active) override;
|
void SetActive(bool active) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager& mgr) const override;
|
void Render(const CStateManager& mgr) const override;
|
||||||
void TouchModels(const CStateManager& mgr) const;
|
void TouchModels(const CStateManager& mgr) const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,7 +26,7 @@ void CScriptPointOfInterest::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId
|
||||||
CActor::AcceptScriptMsg(msg, uid, mgr);
|
CActor::AcceptScriptMsg(msg, uid, mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptPointOfInterest::AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {}
|
void CScriptPointOfInterest::AddToRenderer(const zeus::CFrustum&, CStateManager&) {}
|
||||||
|
|
||||||
void CScriptPointOfInterest::Render(const CStateManager&) const {}
|
void CScriptPointOfInterest::Render(const CStateManager&) const {}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ public:
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
void CalculateRenderBounds() override;
|
void CalculateRenderBounds() override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
|
|
|
@ -37,7 +37,7 @@ public:
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {}
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}
|
||||||
void CreateProjectedShadow();
|
void CreateProjectedShadow();
|
||||||
};
|
};
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
bool worldSfx, bool allowDuplicates, s32 pitch);
|
bool worldSfx, bool allowDuplicates, s32 pitch);
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {}
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}
|
||||||
void PreThink(float, CStateManager&) override;
|
void PreThink(float, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
|
|
|
@ -481,12 +481,14 @@ void CScriptSpecialFunction::PreRender(CStateManager&, const zeus::CFrustum& fru
|
||||||
x1e4_28_frustumEntered = true;
|
x1e4_28_frustumEntered = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptSpecialFunction::AddToRenderer(const zeus::CFrustum&, const CStateManager& mgr) const {
|
void CScriptSpecialFunction::AddToRenderer(const zeus::CFrustum&, CStateManager& mgr) {
|
||||||
if (!GetActive())
|
if (!GetActive()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (xe8_function == ESpecialFunction::FogVolume && x1e4_30_)
|
if (xe8_function == ESpecialFunction::FogVolume && x1e4_30_) {
|
||||||
EnsureRendered(mgr);
|
EnsureRendered(mgr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptSpecialFunction::Render(const CStateManager& mgr) const {
|
void CScriptSpecialFunction::Render(const CStateManager& mgr) const {
|
||||||
|
|
|
@ -125,7 +125,7 @@ public:
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override { return x1c8_touchBounds; }
|
std::optional<zeus::CAABox> GetTouchBounds() const override { return x1c8_touchBounds; }
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
void Accept(IVisitor&) override;
|
void Accept(IVisitor&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Render(const CStateManager& mgr) const override { CActor::Render(mgr); }
|
void Render(const CStateManager& mgr) const override { CActor::Render(mgr); }
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {}
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override { return xfc_aabox; }
|
std::optional<zeus::CAABox> GetTouchBounds() const override { return xfc_aabox; }
|
||||||
void AccumulateBounds(const zeus::CVector3f& v);
|
void AccumulateBounds(const zeus::CVector3f& v);
|
||||||
void BuildWaypointListAndBounds(CStateManager& mgr);
|
void BuildWaypointListAndBounds(CStateManager& mgr);
|
||||||
|
|
|
@ -33,9 +33,10 @@ void CScriptVisorFlare::PreRender(CStateManager& stateMgr, const zeus::CFrustum&
|
||||||
x11c_notInRenderLast = !stateMgr.RenderLast(x8_uid);
|
x11c_notInRenderLast = !stateMgr.RenderLast(x8_uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptVisorFlare::AddToRenderer(const zeus::CFrustum&, const CStateManager& stateMgr) const {
|
void CScriptVisorFlare::AddToRenderer(const zeus::CFrustum&, CStateManager& stateMgr) {
|
||||||
if (x11c_notInRenderLast)
|
if (x11c_notInRenderLast) {
|
||||||
EnsureRendered(stateMgr, stateMgr.GetPlayer().GetTranslation(), GetSortingBounds(stateMgr));
|
EnsureRendered(stateMgr, stateMgr.GetPlayer().GetTranslation(), GetSortingBounds(stateMgr));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptVisorFlare::Render(const CStateManager& stateMgr) const { xe8_flare.Render(GetTranslation(), stateMgr); }
|
void CScriptVisorFlare::Render(const CStateManager& stateMgr) const { xe8_flare.Render(GetTranslation(), stateMgr); }
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
void Think(float, CStateManager& stateMgr) override;
|
void Think(float, CStateManager& stateMgr) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ void CScriptVisorGoo::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId,
|
||||||
CActor::AcceptScriptMsg(msg, objId, mgr);
|
CActor::AcceptScriptMsg(msg, objId, mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptVisorGoo::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CScriptVisorGoo::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
// Empty
|
// Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void Think(float, CStateManager& stateMgr) override;
|
void Think(float, CStateManager& stateMgr) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
void Touch(CActor&, CStateManager&) override;
|
void Touch(CActor&, CStateManager&) override;
|
||||||
|
|
|
@ -413,12 +413,14 @@ void CScriptWater::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptWater::AddToRenderer(const zeus::CFrustum& /*frustum*/, const CStateManager& mgr) const {
|
void CScriptWater::AddToRenderer(const zeus::CFrustum& /*frustum*/, CStateManager& mgr) {
|
||||||
if (!xe4_30_outOfFrustum) {
|
if (xe4_30_outOfFrustum) {
|
||||||
zeus::CPlane plane(zeus::skUp, x34_transform.origin.z() + x130_bounds.max.z());
|
return;
|
||||||
zeus::CAABox renderBounds = GetSortingBounds(mgr);
|
|
||||||
mgr.AddDrawableActorPlane(*this, plane, renderBounds);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const zeus::CPlane plane(zeus::skUp, x34_transform.origin.z() + x130_bounds.max.z());
|
||||||
|
const zeus::CAABox renderBounds = GetSortingBounds(mgr);
|
||||||
|
mgr.AddDrawableActorPlane(*this, plane, renderBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptWater::Render(const CStateManager& mgr) const {
|
void CScriptWater::Render(const CStateManager& mgr) const {
|
||||||
|
|
|
@ -104,7 +104,7 @@ public:
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
void Touch(CActor&, CStateManager&) override;
|
void Touch(CActor&, CStateManager&) override;
|
||||||
void CalculateRenderBounds() override;
|
void CalculateRenderBounds() override;
|
||||||
|
|
|
@ -33,7 +33,7 @@ void CScriptWaypoint::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender
|
||||||
SendScriptMsgs(EScriptObjectState::Arrived, mgr, EScriptObjectMessage::None);
|
SendScriptMsgs(EScriptObjectState::Arrived, mgr, EScriptObjectMessage::None);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptWaypoint::AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {
|
void CScriptWaypoint::AddToRenderer(const zeus::CFrustum&, CStateManager&) {
|
||||||
// Empty
|
// Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
TUniqueId FollowWaypoint(CStateManager& mgr) const;
|
TUniqueId FollowWaypoint(CStateManager& mgr) const;
|
||||||
TUniqueId NextWaypoint(CStateManager& mgr) const;
|
TUniqueId NextWaypoint(CStateManager& mgr) const;
|
||||||
float GetSpeed() const { return xe8_speed; }
|
float GetSpeed() const { return xe8_speed; }
|
||||||
|
|
|
@ -139,14 +139,17 @@ void CSnakeWeedSwarm::PreRender(CStateManager& mgr, const zeus::CFrustum& frustu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSnakeWeedSwarm::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
void CSnakeWeedSwarm::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||||
if (xe4_30_outOfFrustum)
|
if (xe4_30_outOfFrustum) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (x1ec_particleGen1)
|
if (x1ec_particleGen1) {
|
||||||
g_Renderer->AddParticleGen(*x1ec_particleGen1);
|
g_Renderer->AddParticleGen(*x1ec_particleGen1);
|
||||||
if (x1f4_particleGen2)
|
}
|
||||||
|
if (x1f4_particleGen2) {
|
||||||
g_Renderer->AddParticleGen(*x1f4_particleGen2);
|
g_Renderer->AddParticleGen(*x1f4_particleGen2);
|
||||||
|
}
|
||||||
|
|
||||||
if (x90_actorLights) {
|
if (x90_actorLights) {
|
||||||
for (const auto& modelData : x1b0_modelData) {
|
for (const auto& modelData : x1b0_modelData) {
|
||||||
|
@ -158,8 +161,9 @@ void CSnakeWeedSwarm::AddToRenderer(const zeus::CFrustum& frustum, const CStateM
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 posesToBuild = -1;
|
u32 posesToBuild = -1;
|
||||||
for (u32 i = 0; i < x134_boids.size(); ++i)
|
for (u32 i = 0; i < x134_boids.size(); ++i) {
|
||||||
RenderBoid(i, x134_boids[i], posesToBuild);
|
RenderBoid(i, x134_boids[i], posesToBuild);
|
||||||
|
}
|
||||||
CGraphics::DisableAllLights();
|
CGraphics::DisableAllLights();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ public:
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Touch(CActor&, CStateManager&) override;
|
void Touch(CActor&, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
|
|
||||||
|
|
|
@ -983,7 +983,7 @@ void CWallCrawlerSwarm::RenderParticles() const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWallCrawlerSwarm::AddToRenderer(const zeus::CFrustum&, const CStateManager& mgr) const {
|
void CWallCrawlerSwarm::AddToRenderer(const zeus::CFrustum&, CStateManager& mgr) {
|
||||||
if (!GetActive()) {
|
if (!GetActive()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,7 +195,7 @@ public:
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
||||||
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
||||||
void Render(const CStateManager&) const override;
|
void Render(const CStateManager&) const override;
|
||||||
bool CanRenderUnsorted(const CStateManager&) const override;
|
bool CanRenderUnsorted(const CStateManager&) const override;
|
||||||
void CalculateRenderBounds() override;
|
void CalculateRenderBounds() override;
|
||||||
|
|
Loading…
Reference in New Issue