- scriptified ASoundSequence.

- exported virtual Actor.MarkPrecacheSounds function.
This commit is contained in:
Christoph Oelckers 2017-01-14 14:35:11 +01:00
commit 96777273c4
8 changed files with 180 additions and 197 deletions

View file

@ -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)
{