1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-22 19:00:07 +00:00

Fix cAudioScriptObject

This commit is contained in:
Sergeanur 2020-08-20 14:47:53 +03:00
parent a9a1bf5056
commit 0f5a771292
3 changed files with 15 additions and 2 deletions

View file

@ -4,6 +4,16 @@
#include "Pools.h"
#include "DMAudio.h"
cAudioScriptObject::cAudioScriptObject()
{
Reset();
};
cAudioScriptObject::~cAudioScriptObject()
{
Reset();
};
void
cAudioScriptObject::Reset()
{

View file

@ -7,6 +7,9 @@ public:
CVector Posn;
int32 AudioEntity;
cAudioScriptObject();
~cAudioScriptObject();
void Reset(); /// ok
static void* operator new(size_t);

View file

@ -203,7 +203,7 @@ cDMAudio::ReportCrime(eCrimeType crime, const CVector &pos)
int32
cDMAudio::CreateLoopingScriptObject(cAudioScriptObject *scriptObject)
{
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, (CPhysical *)scriptObject);
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) )
AudioManager.SetEntityStatus(audioEntity, true);
@ -220,7 +220,7 @@ cDMAudio::DestroyLoopingScriptObject(int32 audioEntity)
void
cDMAudio::CreateOneShotScriptObject(cAudioScriptObject *scriptObject)
{
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, (CPhysical *)scriptObject);
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) )
{