mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-25 17:32:27 +00:00
Add dynslope demoversion compat check
This commit is contained in:
parent
a1f007c40c
commit
ea45def97b
2 changed files with 18 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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<<i;
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
|
||||
/// Create a new slope and add it to the slope list.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue