mirror of https://github.com/AxioDL/metaforce.git
CActor: Remove sound emitter on destroy
This commit is contained in:
parent
7ef204c552
commit
279ad54264
|
@ -60,6 +60,8 @@ CActor::CActor(TUniqueId uid, bool active, std::string_view name, const CEntityI
|
||||||
x98_scanObjectInfo = g_SimplePool->GetObj(SObjectTag{FOURCC('SCAN'), params.x40_scanParms.GetScanId()});
|
x98_scanObjectInfo = g_SimplePool->GetObj(SObjectTag{FOURCC('SCAN'), params.x40_scanParms.GetScanId()});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CActor::~CActor() { RemoveEmitter(); }
|
||||||
|
|
||||||
void CActor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {
|
void CActor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case EScriptObjectMessage::Activate: {
|
case EScriptObjectMessage::Activate: {
|
||||||
|
|
|
@ -100,6 +100,7 @@ public:
|
||||||
DEFINE_ENTITY
|
DEFINE_ENTITY
|
||||||
CActor(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info, const zeus::CTransform&,
|
CActor(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info, const zeus::CTransform&,
|
||||||
CModelData&& mData, const CMaterialList& list, const CActorParameters& params, TUniqueId otherUid);
|
CModelData&& mData, const CMaterialList& list, const CActorParameters& params, TUniqueId otherUid);
|
||||||
|
~CActor();
|
||||||
|
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void SetActive(bool active) override {
|
void SetActive(bool active) override {
|
||||||
|
|
Loading…
Reference in New Issue