CActor: Remove sound emitter on destroy

This commit is contained in:
Luke Street 2022-08-15 09:55:48 -04:00
parent 7ef204c552
commit 279ad54264
2 changed files with 3 additions and 0 deletions

View File

@ -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()});
}
CActor::~CActor() { RemoveEmitter(); }
void CActor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {
switch (msg) {
case EScriptObjectMessage::Activate: {

View File

@ -100,6 +100,7 @@ public:
DEFINE_ENTITY
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);
~CActor();
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
void SetActive(bool active) override {