mirror of https://github.com/PrimeDecomp/prime.git
Match CScriptSpecialFunction::DeleteEmitter
Former-commit-id: e48f6478f9
This commit is contained in:
parent
2732fd1688
commit
8cac11d25d
|
@ -14,6 +14,7 @@ public:
|
||||||
bool operator==(const CSfxHandle& other) { return mID == other.mID; }
|
bool operator==(const CSfxHandle& other) { return mID == other.mID; }
|
||||||
bool operator!=(const CSfxHandle& other) { return mID != other.mID; }
|
bool operator!=(const CSfxHandle& other) { return mID != other.mID; }
|
||||||
operator bool() const { return mID != 0; }
|
operator bool() const { return mID != 0; }
|
||||||
|
void Clear() { mID = 0; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint mID;
|
uint mID;
|
||||||
|
|
|
@ -141,7 +141,7 @@ public:
|
||||||
|
|
||||||
bool ShouldSkipCinematic(CStateManager& stateMgr) const;
|
bool ShouldSkipCinematic(CStateManager& stateMgr) const;
|
||||||
|
|
||||||
void DeleteEmitter(const CSfxHandle& handle);
|
void DeleteEmitter(CSfxHandle& handle);
|
||||||
u32 GetSpecialEnding(const CStateManager&) const;
|
u32 GetSpecialEnding(const CStateManager&) const;
|
||||||
void AddOrUpdateEmitter(float pitch, CSfxHandle& handle, u16 id, const CVector3f& pos, uchar vol);
|
void AddOrUpdateEmitter(float pitch, CSfxHandle& handle, u16 id, const CVector3f& pos, uchar vol);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1078,12 +1078,11 @@ void CScriptSpecialFunction::ThinkPlayerInArea(float dt, CStateManager& mgr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptSpecialFunction::DeleteEmitter(const CSfxHandle& handle) {
|
void CScriptSpecialFunction::DeleteEmitter(CSfxHandle& handle) {
|
||||||
if (!handle) {
|
if (handle) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
CSfxManager::RemoveEmitter(handle);
|
CSfxManager::RemoveEmitter(handle);
|
||||||
|
handle.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CScriptSpecialFunction::GetSpecialEnding(const CStateManager& mgr) const {
|
u32 CScriptSpecialFunction::GetSpecialEnding(const CStateManager& mgr) const {
|
||||||
|
|
Loading…
Reference in New Issue