From d0942bcb972c0a8750b80042c970e9e02a2cb7e7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 28 Jan 2019 14:06:19 +0100 Subject: [PATCH] - moved FirstThinker function to FLevelLocals Currently it is meaningless but that's where it should be later. --- src/dthinker.cpp | 6 +++--- src/dthinker.h | 1 - src/g_levellocals.h | 1 + src/g_shared/a_decals.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dthinker.cpp b/src/dthinker.cpp index 959d9f3e9f..c104e677a6 100644 --- a/src/dthinker.cpp +++ b/src/dthinker.cpp @@ -328,7 +328,7 @@ void DThinker::PostSerialize() // //========================================================================== -DThinker *DThinker::FirstThinker (int statnum) +DThinker *FLevelLocals::FirstThinker (int statnum) { DThinker *node; @@ -336,10 +336,10 @@ DThinker *DThinker::FirstThinker (int statnum) { statnum = MAX_STATNUM; } - node = Thinkers[statnum].GetHead(); + node = DThinker::Thinkers[statnum].GetHead(); if (node == NULL) { - node = FreshThinkers[statnum].GetHead(); + node = DThinker::FreshThinkers[statnum].GetHead(); if (node == NULL) { return NULL; diff --git a/src/dthinker.h b/src/dthinker.h index c90c8b536d..a48a2d113e 100644 --- a/src/dthinker.h +++ b/src/dthinker.h @@ -90,7 +90,6 @@ public: static void SerializeThinkers(FSerializer &arc, bool keepPlayers); static void MarkRoots(); - static DThinker *FirstThinker (int statnum); private: static void DestroyThinkersInList (FThinkerList &list); static bool DoDestroyThinkersInList(FThinkerList &list); diff --git a/src/g_levellocals.h b/src/g_levellocals.h index 5d1feaadf7..de6ff23316 100644 --- a/src/g_levellocals.h +++ b/src/g_levellocals.h @@ -261,6 +261,7 @@ public: FSerializer &SerializeSubsectors(FSerializer &arc, const char *key); void SpawnExtraPlayers(); void Serialize(FSerializer &arc, bool hubload); + DThinker *FirstThinker (int statnum); // g_Game void PlayerReborn (int player); diff --git a/src/g_shared/a_decals.cpp b/src/g_shared/a_decals.cpp index 10fec6ce0b..5546aef080 100644 --- a/src/g_shared/a_decals.cpp +++ b/src/g_shared/a_decals.cpp @@ -542,7 +542,7 @@ CUSTOM_CVAR (Int, cl_maxdecals, 1024, CVAR_ARCHIVE) { while (Level->ImpactDecalCount > self) { - DThinker *thinker = DThinker::FirstThinker(STAT_AUTODECAL); + DThinker *thinker = Level->FirstThinker(STAT_AUTODECAL); if (thinker != NULL) { thinker->Destroy(); @@ -555,7 +555,7 @@ void DImpactDecal::CheckMax () { if (++Level->ImpactDecalCount >= cl_maxdecals) { - DThinker *thinker = DThinker::FirstThinker (STAT_AUTODECAL); + DThinker *thinker = Level->FirstThinker (STAT_AUTODECAL); if (thinker != NULL) { thinker->Destroy();