mirror of https://github.com/AxioDL/metaforce.git
CWaveBuster: Add AcceptScriptMsg implementation
This commit is contained in:
parent
cd13a49649
commit
77861a9b9f
|
@ -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);
|
||||
|
|
|
@ -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<zeus::CAABox> GetTouchBounds() const override;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue