- give thinkers a 'level' member and change linking to the chain to happen outside the constructor.
This commit is contained in:
parent
df4c7d8f56
commit
8323524014
43 changed files with 201 additions and 228 deletions
|
|
@ -1835,7 +1835,7 @@ void FParser::SF_FadeLight(void)
|
|||
auto it = Level->GetSectorTagIterator(sectag);
|
||||
while ((i = it.Next()) >= 0)
|
||||
{
|
||||
if (!Level->sectors[i].lightingdata) Create<DLightLevel>(&Level->sectors[i],destlevel,speed);
|
||||
if (!Level->sectors[i].lightingdata) Level->CreateThinker<DLightLevel>(&Level->sectors[i],destlevel,speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ bool FScriptLoader::ParseInfo(MapData * map)
|
|||
I_Error("Only one FraggleThinker is allowed to exist at a time.\nCheck your code.");
|
||||
}
|
||||
|
||||
auto th = Create<DFraggleThinker>();
|
||||
auto th = Level->CreateThinker<DFraggleThinker>();
|
||||
th->LevelScript->data = copystring(scriptsrc.GetChars());
|
||||
Level->FraggleScriptThinker = th;
|
||||
|
||||
|
|
|
|||
|
|
@ -366,7 +366,6 @@ IMPLEMENT_POINTERS_END
|
|||
//==========================================================================
|
||||
|
||||
DFraggleThinker::DFraggleThinker()
|
||||
: DThinker(STAT_SCRIPTS)
|
||||
{
|
||||
GlobalScript = Create<DFsScript>();
|
||||
GC::WriteBarrier(this, GlobalScript);
|
||||
|
|
|
|||
|
|
@ -688,7 +688,7 @@ class DFraggleThinker : public DThinker
|
|||
DECLARE_CLASS(DFraggleThinker, DThinker)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
|
||||
static const int DEFAULT_STAT = STAT_SCRIPTS;
|
||||
int zoom = 1;
|
||||
AActor *trigger_obj; // this is a transient pointer not being subjected to GC.
|
||||
TObjPtr<DFsScript*> GlobalScript;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue