mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- 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:
parent
4e052f2857
commit
20989a0b41
3 changed files with 361 additions and 364 deletions
|
@ -228,6 +228,11 @@ public:
|
||||||
{
|
{
|
||||||
return NActorIterator(TIDHash, type, tid);
|
return NActorIterator(TIDHash, type, tid);
|
||||||
}
|
}
|
||||||
|
AActor *SingleActorFromTID(int tid, AActor *defactor)
|
||||||
|
{
|
||||||
|
return tid == 0 ? defactor : GetActorIterator(tid).Next();
|
||||||
|
}
|
||||||
|
|
||||||
bool SectorHasTags(sector_t *sector)
|
bool SectorHasTags(sector_t *sector)
|
||||||
{
|
{
|
||||||
return tagManager.SectorHasTags(sector);
|
return tagManager.SectorHasTags(sector);
|
||||||
|
|
699
src/p_acs.cpp
699
src/p_acs.cpp
File diff suppressed because it is too large
Load diff
|
@ -70,9 +70,6 @@
|
||||||
#include "actorinlines.h"
|
#include "actorinlines.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
AActor *SingleActorFromTID(int tid, AActor *defactor);
|
|
||||||
|
|
||||||
|
|
||||||
static FRandom pr_camissile ("CustomActorfire");
|
static FRandom pr_camissile ("CustomActorfire");
|
||||||
static FRandom pr_cabullet ("CustomBullet");
|
static FRandom pr_cabullet ("CustomBullet");
|
||||||
static FRandom pr_cwjump ("CustomWpJump");
|
static FRandom pr_cwjump ("CustomWpJump");
|
||||||
|
@ -3444,7 +3441,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Warp)
|
||||||
|
|
||||||
if ((flags & WARPF_USETID))
|
if ((flags & WARPF_USETID))
|
||||||
{
|
{
|
||||||
reference = SingleActorFromTID(destination_selector, self);
|
reference = level.SingleActorFromTID(destination_selector, self);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue