diff --git a/Runtime/Weapon/CWaveBuster.cpp b/Runtime/Weapon/CWaveBuster.cpp index 7316af254..50a59e5b4 100644 --- a/Runtime/Weapon/CWaveBuster.cpp +++ b/Runtime/Weapon/CWaveBuster.cpp @@ -36,6 +36,26 @@ void CWaveBuster::SetNewTarget(TUniqueId id) {} void CWaveBuster::Accept(IVisitor& visitor) { visitor.Visit(this); } +void CWaveBuster::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId senderId, CStateManager& mgr) { + if (msg == EScriptObjectMessage::Deleted) { + DeleteProjectileLight(mgr); + } else if (msg == EScriptObjectMessage::Registered) { + if (x390_busterLightGen != nullptr && x390_busterLightGen->SystemHasLight()) { + const CLight light = x390_busterLightGen->GetLight(); + CreateProjectileLight("WaveBuster_Light", light, mgr); + } + + // Thermal hot + xe6_27_thermalVisorFlags = 2; + + x318_ = x2e8_originalXf.origin; + x324_ = x34_transform.origin; + x330_ = x34_transform.origin; + } + + CGameProjectile::AcceptScriptMsg(msg, senderId, mgr); +} + void CWaveBuster::AddToRenderer([[maybe_unused]] const zeus::CFrustum& frustum, CStateManager& mgr) { const auto bounds = GetSortingBounds(mgr); EnsureRendered(mgr, x2e8_originalXf.origin, bounds); diff --git a/Runtime/Weapon/CWaveBuster.hpp b/Runtime/Weapon/CWaveBuster.hpp index b4cd25720..95245c8cc 100644 --- a/Runtime/Weapon/CWaveBuster.hpp +++ b/Runtime/Weapon/CWaveBuster.hpp @@ -56,6 +56,7 @@ public: void SetNewTarget(TUniqueId id); void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId senderId, CStateManager& mgr) override; void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override; std::optional GetTouchBounds() const override; };