Skip to content

Commit

Permalink
CActor: Remove sound emitter on destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Aug 15, 2022
1 parent 7ef204c commit 279ad54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Runtime/World/CActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions Runtime/World/CActor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class CActor : public CEntity {
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 {
Expand Down

0 comments on commit 279ad54

Please sign in to comment.