- use a local variable to access the level in DLevelScript.

This was a relatively cheap change but removes a significant batch of references to the global variable, only making the entry points to the ACS interpreter relevant.
This commit is contained in:
Christoph Oelckers 2019-01-25 19:04:40 +01:00
parent 4e052f2857
commit 20989a0b41
3 changed files with 361 additions and 364 deletions

View File

@ -228,6 +228,11 @@ public:
{
return NActorIterator(TIDHash, type, tid);
}
AActor *SingleActorFromTID(int tid, AActor *defactor)
{
return tid == 0 ? defactor : GetActorIterator(tid).Next();
}
bool SectorHasTags(sector_t *sector)
{
return tagManager.SectorHasTags(sector);

File diff suppressed because it is too large Load Diff

View File

@ -70,9 +70,6 @@
#include "actorinlines.h"
#include "types.h"
AActor *SingleActorFromTID(int tid, AActor *defactor);
static FRandom pr_camissile ("CustomActorfire");
static FRandom pr_cabullet ("CustomBullet");
static FRandom pr_cwjump ("CustomWpJump");
@ -3444,7 +3441,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Warp)
if ((flags & WARPF_USETID))
{
reference = SingleActorFromTID(destination_selector, self);
reference = level.SingleActorFromTID(destination_selector, self);
}
else
{