mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 10:39:00 +00:00
fix
This commit is contained in:
parent
6909fa283a
commit
437a817505
1 changed files with 7 additions and 7 deletions
|
@ -3494,9 +3494,9 @@ int8 CRunningScript::ProcessCommandsFrom300To399(int32 command)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
cAudioScriptObject* obj = new cAudioScriptObject();
|
cAudioScriptObject* obj = new cAudioScriptObject();
|
||||||
obj->m_vecPos = *(CVector*)&ScriptParams[0];
|
obj->Posn = *(CVector*)&ScriptParams[0];
|
||||||
obj->m_wSound = ScriptParams[3];
|
obj->AudioId = ScriptParams[3];
|
||||||
obj->m_nAudioEntityId = -5;
|
obj->AudioEntity = AEHANDLE_NONE;
|
||||||
/* BUG: if audio is not initialized, this object will not be freed. */
|
/* BUG: if audio is not initialized, this object will not be freed. */
|
||||||
/* Issue needs to be addressed in CreateOneShotScriptObject. */
|
/* Issue needs to be addressed in CreateOneShotScriptObject. */
|
||||||
DMAudio.CreateOneShotScriptObject(obj);
|
DMAudio.CreateOneShotScriptObject(obj);
|
||||||
|
@ -3506,9 +3506,9 @@ int8 CRunningScript::ProcessCommandsFrom300To399(int32 command)
|
||||||
{
|
{
|
||||||
CollectParameters(&m_nIp, 4);
|
CollectParameters(&m_nIp, 4);
|
||||||
cAudioScriptObject* obj = new cAudioScriptObject();
|
cAudioScriptObject* obj = new cAudioScriptObject();
|
||||||
obj->m_vecPos = *(CVector*)&ScriptParams[0];
|
obj->Posn = *(CVector*)&ScriptParams[0];
|
||||||
obj->m_wSound = ScriptParams[3];
|
obj->AudioId = ScriptParams[3];
|
||||||
obj->m_nAudioEntityId = DMAudio.CreateLoopingScriptObject(obj);
|
obj->AudioEntity = DMAudio.CreateLoopingScriptObject(obj);
|
||||||
ScriptParams[0] = CPools::GetAudioScriptObjectPool()->GetIndex(obj);
|
ScriptParams[0] = CPools::GetAudioScriptObjectPool()->GetIndex(obj);
|
||||||
StoreParameters(&m_nIp, 1);
|
StoreParameters(&m_nIp, 1);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3521,7 +3521,7 @@ int8 CRunningScript::ProcessCommandsFrom300To399(int32 command)
|
||||||
debug("REMOVE_SOUND - Sound doesn't exist\n");
|
debug("REMOVE_SOUND - Sound doesn't exist\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
DMAudio.DestroyLoopingScriptObject(obj->m_nAudioEntityId);
|
DMAudio.DestroyLoopingScriptObject(obj->AudioEntity);
|
||||||
delete obj;
|
delete obj;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue