CWaveBuster: Add AcceptScriptMsg implementation

This commit is contained in:
Lioncash 2020-05-09 21:24:07 -04:00
parent cd13a49649
commit 77861a9b9f
2 changed files with 21 additions and 0 deletions

View File

@ -36,6 +36,26 @@ void CWaveBuster::SetNewTarget(TUniqueId id) {}
void CWaveBuster::Accept(IVisitor& visitor) { visitor.Visit(this); } 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) { void CWaveBuster::AddToRenderer([[maybe_unused]] const zeus::CFrustum& frustum, CStateManager& mgr) {
const auto bounds = GetSortingBounds(mgr); const auto bounds = GetSortingBounds(mgr);
EnsureRendered(mgr, x2e8_originalXf.origin, bounds); EnsureRendered(mgr, x2e8_originalXf.origin, bounds);

View File

@ -56,6 +56,7 @@ public:
void SetNewTarget(TUniqueId id); void SetNewTarget(TUniqueId id);
void Accept(IVisitor& visitor) override; void Accept(IVisitor& visitor) override;
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId senderId, CStateManager& mgr) override;
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override; void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
std::optional<zeus::CAABox> GetTouchBounds() const override; std::optional<zeus::CAABox> GetTouchBounds() const override;
}; };