diff --git a/src/g_demo.cpp b/src/g_demo.cpp index 61fba51f6..feb35c5c8 100644 --- a/src/g_demo.cpp +++ b/src/g_demo.cpp @@ -169,8 +169,11 @@ demoghost *ghosts = NULL; // - Slope physics changed with a scaling fix // - 0x000C (Ring Racers v2.2) // - 0x000D (Ring Racers v2.3) +// - 0x000E (Ring Racers v2.4 in-dev before DYNSLOPE thinker change) +// - 0x000F (Ring Racers v2.4) -#define DEMOVERSION 0x000E +#define MINDEMOVERSION 0x000E +#define DEMOVERSION 0x000F boolean G_CompatLevel(UINT16 level) { @@ -2440,7 +2443,7 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname) c = READUINT8(p); // SUBVERSION I_Assert(c == SUBVERSION); s = READUINT16(p); - I_Assert(s == DEMOVERSION); + I_Assert(s >= MINDEMOVERSION && s <= DEMOVERSION); p += 64; // full demo title p += 16; // demo checksum I_Assert(!memcmp(p, "PLAY", 4)); @@ -2488,6 +2491,8 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname) oldversion = READUINT16(p); switch(oldversion) // demoversion { + case 0x000E: + /* fallthru */ case DEMOVERSION: // latest always supported break; // too old, cannot support. @@ -2636,6 +2641,8 @@ void G_LoadDemoInfo(menudemo_t *pdemo, boolean allownonmultiplayer) switch(pdemoversion) { + case 0x000E: + /* fallthru */ case DEMOVERSION: // latest always supported if (P_SaveBufferRemaining(&info) < 64) { @@ -3033,6 +3040,8 @@ void G_DoPlayDemoEx(const char *defdemoname, lumpnum_t deflumpnum) demo.version = READUINT16(demobuf.p); switch(demo.version) { + case 0x000E: + /* fallthru */ case DEMOVERSION: // latest always supported break; // too old, cannot support. @@ -3521,6 +3530,8 @@ void G_AddGhost(savebuffer_t *buffer, const char *defdemoname) ghostversion = READUINT16(p); switch(ghostversion) { + case 0x000E: + /* fallthru */ case DEMOVERSION: // latest always supported break; // too old, cannot support. @@ -3805,6 +3816,8 @@ staffbrief_t *G_GetStaffGhostBrief(UINT8 *buffer) ghostversion = READUINT16(p); switch(ghostversion) { + case 0x000E: + /* fallthru */ case DEMOVERSION: // latest always supported break; diff --git a/src/p_slopes.c b/src/p_slopes.c index 247f34557..b80c784c5 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -13,6 +13,7 @@ #include "d_think.h" #include "doomdef.h" +#include "g_demo.h" #include "r_defs.h" #include "r_state.h" #include "m_bbox.h" @@ -308,7 +309,7 @@ static inline void P_AddDynLineSlopeThinker (pslope_t* slope, dynplanetype_t typ th->sourceline = sourceline; th->extent = extent; // Handle old demos as well. - P_AddThinker(/*G_CompatLevel(0x000D) ? THINK_DYNSLOPEDEMO :*/ THINK_DYNSLOPE, &th->thinker); + P_AddThinker(G_CompatLevel(0x000E) ? THINK_DYNSLOPEDEMO : THINK_DYNSLOPE, &th->thinker); // interpolation R_CreateInterpolator_DynSlope(&th->thinker, slope); @@ -339,7 +340,7 @@ static inline void P_AddDynVertexSlopeThinker (pslope_t* slope, const INT16 tags th->relative |= 1<thinker); + P_AddThinker(G_CompatLevel(0x000E) ? THINK_DYNSLOPEDEMO : THINK_DYNSLOPE, &th->thinker); } /// Create a new slope and add it to the slope list.