- scriptified ASoundSequence.
- exported virtual Actor.MarkPrecacheSounds function.
This commit is contained in:
parent
0b62645a35
commit
96777273c4
8 changed files with 180 additions and 197 deletions
|
|
@ -54,6 +54,7 @@
|
|||
#include "d_player.h"
|
||||
#include "r_state.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "virtual.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
|
@ -479,7 +480,16 @@ void S_PrecacheLevel ()
|
|||
// Precache all sounds known to be used by the currently spawned actors.
|
||||
while ( (actor = iterator.Next()) != NULL )
|
||||
{
|
||||
actor->MarkPrecacheSounds();
|
||||
IFVIRTUALPTR(actor, AActor, MarkPrecacheSounds)
|
||||
{
|
||||
// Without the type cast this picks the 'void *' assignment...
|
||||
VMValue params[1] = { actor };
|
||||
GlobalVMStack.Call(func, params, 1, nullptr, 0, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->MarkPrecacheSounds();
|
||||
}
|
||||
}
|
||||
for (auto i : gameinfo.PrecachedSounds)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue