Perform dynamic slope thinking before other thinkers.

Signed-off-by: Nev3r <apophycens@gmail.com>
This commit is contained in:
Nev3r 2019-04-18 14:43:34 +02:00
parent 6d702b86c2
commit f7d1515888
3 changed files with 22 additions and 10 deletions

View File

@ -10,9 +10,6 @@
/// \file p_slopes.c
/// \brief ZDoom + Eternity Engine Slopes, ported and enhanced by Kalaron
#ifndef P_SLOPES_H__
#define P_SLOPES_H__
#ifdef ESLOPE
void P_CalculateSlopeNormal(pslope_t *slope);
void P_ResetDynamicSlopes(void);
@ -42,7 +39,12 @@ fixed_t P_GetWallTransferMomZ(mobj_t *mo, pslope_t *slope);
void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope);
void P_ButteredSlope(mobj_t *mo);
#endif
/// Permit slopes to be dynamically altered.
typedef struct
{
thinker_t thinker;
pslope_t* slope;
} dynplanethink_t;
// EOF
void T_DynamicSlope (dynplanethink_t* th);
#endif // #ifdef ESLOPE

View File

@ -5558,11 +5558,6 @@ void P_UpdateSpecials(void)
// POINT LIMIT
P_CheckPointLimit();
#ifdef ESLOPE
// Dynamic slopeness
P_RunDynamicSlopes();
#endif
// ANIMATE TEXTURES
for (anim = anims; anim < lastanim; anim++)
{

View File

@ -25,6 +25,11 @@
// Object place
#include "m_cheat.h"
#ifdef ESLOPE
// Dynamic slopes
#include "p_slopes.h"
#endif
tic_t leveltime;
//
@ -609,6 +614,11 @@ void P_Ticker(boolean run)
if (run)
{
#ifdef ESLOPE
// Dynamic slopeness
P_RunDynamicSlopes();
#endif
P_RunThinkers();
// Run any "after all the other thinkers" stuff
@ -724,6 +734,11 @@ void P_PreTicker(INT32 frames)
memcpy(&players[i].cmd, &temptic, sizeof(ticcmd_t));
}
#ifdef ESLOPE
// Dynamic slopeness
P_RunDynamicSlopes();
#endif
P_RunThinkers();
// Run any "after all the other thinkers" stuff