From 11dba34f43d87baf2096dd67a5e2c10118de534d Mon Sep 17 00:00:00 2001 From: Nev3r Date: Sun, 21 Apr 2019 11:52:18 +0200 Subject: [PATCH] Remove dynamic slope queue list due to now being unnecessary. Signed-off-by: Nev3r --- src/p_setup.c | 1 - src/p_slopes.c | 45 +-------------------------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index e15ba833b..d6e96a3f5 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2912,7 +2912,6 @@ boolean P_SetupLevel(boolean skipprecip) #ifdef ESLOPE P_ResetDynamicSlopes(fromnetsave); - P_LinkSlopeThinkers(); // Spawn slope thinkers just after plane move thinkers to avoid movement/update delays. #endif P_LoadThings(loademblems); diff --git a/src/p_slopes.c b/src/p_slopes.c index 6c494c7b4..6aee9fcff 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -28,46 +28,6 @@ pslope_t *slopelist = NULL; UINT16 slopecount = 0; -thinker_t *dynthinklist; -size_t dynthinknum; - -/// Links previously queued thinker list to the main thinker list. -void P_LinkSlopeThinkers (void) -{ - size_t i; - thinker_t *th = dynthinklist; - - CONS_Printf("Number of dynamic thinkers: %d\n", dynthinknum); - - for (i = 0; i < dynthinknum; i++) - { - thinker_t *next = th->next; - P_AddThinker(th); - th = next; - } -} - -/// Queues a thinker to a partial linked list to be immediately incorporated later via P_LinkSlopeThinkers(). -static void P_QueueSlopeThinker (thinker_t* th) -{ - thinker_t* last = dynthinklist; - - // First entry. - if (!last) - { - dynthinklist = th; - dynthinknum++; - return; - } - - while (last->next) - last = last->next; - - last->next = th; - - dynthinknum++; -} - // Calculate line normal void P_CalculateSlopeNormal(pslope_t *slope) { slope->normal.z = FINECOSINE(slope->zangle>>ANGLETOFINESHIFT); @@ -211,7 +171,7 @@ static inline void P_AddDynSlopeThinker (pslope_t* slope, dynplanetype_t type, l th->slope = slope; th->type = type; - P_QueueSlopeThinker(&th->thinker); + P_AddThinker(THINK_MAIN, &th->thinker); } @@ -596,9 +556,6 @@ void P_ResetDynamicSlopes(const UINT32 fromsave) { slopelist = NULL; slopecount = 0; - dynthinklist = NULL; - dynthinknum = 0; - /// Generates line special-defined slopes. for (i = 0; i < numlines; i++) {