change when dynamic slopes run depending on if you joined midgame

This commit is contained in:
Alug committed 2024-07-10 06:21:48 +02:00
1 parent c28188b6d8
commit f88d92ecee
4 files changed
+15 -8

No files matched your search

+4
View File
@@ -150,6 +150,8 @@ static SINT8 partadd_stage = -1;
static boolean partadd_replacescurrentmap = false;
static boolean partadd_important = false;
SINT8 midgamejoin = 0;
/** Logs an error about a map being corrupt, then terminate.
* This allows reporting highly technical errors for usefulness, without
* confusing a novice map designer who simply needs to run ZenNode.
@@ -2587,6 +2589,7 @@ boolean P_SetupLevel(boolean skipprecip)
INT32 i, loadprecip = 1, ranspecialwipe = 0;
INT32 loademblems = 1;
INT32 fromnetsave = 0;
midgamejoin = 0;
sector_t *ss;
boolean chase;
@@ -2781,6 +2784,7 @@ boolean P_SetupLevel(boolean skipprecip)
fromnetsave = 1;
loadprecip = 0;
loademblems = 0;
midgamejoin = 1;
}
// internal game map
+2
View File
@@ -18,6 +18,8 @@
#include "doomstat.h"
#include "r_defs.h"
extern SINT8 midgamejoin;
// map md5, sent to players via PT_SERVERINFO
extern unsigned char mapmd5[16];
+4
View File
@@ -4980,6 +4980,10 @@ void P_UpdateSpecials(void)
// LEVEL TIMER
P_CheckTimeLimit();
// Dynamic slopeness
if (!midgamejoin) // run here when not joined midgame to prevent any potential issues that may arise
P_RunDynamicSlopes();
// POINT LIMIT
P_CheckPointLimit();
+5 -8
View File
@@ -18,6 +18,7 @@
#include "z_zone.h"
#include "s_sound.h"
#include "st_stuff.h"
#include "p_setup.h"
#include "p_polyobj.h"
#include "m_random.h"
#include "lua_script.h"
@@ -686,7 +687,8 @@ void P_Ticker(boolean run)
if (run)
{
// Dynamic slopeness
P_RunDynamicSlopes();
if (midgamejoin) // only run here if we joined midgame to fix some desynchs
P_RunDynamicSlopes();
PS_START_TIMING(ps_thinkertime);
P_RunThinkers();
@@ -721,12 +723,6 @@ void P_Ticker(boolean run)
if (!(modeattacking && !demo.playback) || leveltime >= starttime - TICRATE*4)
timeinmap++;
/*if (G_TagGametype())
P_DoTagStuff();
if (G_GametypeHasTeams())
P_DoCTFStuff();*/
if (run)
{
if (countdowntimer && --countdowntimer <= 0)
@@ -905,7 +901,8 @@ void P_PreTicker(INT32 frames)
}
// Dynamic slopeness
P_RunDynamicSlopes();
if (midgamejoin)
P_RunDynamicSlopes();
P_RunThinkers();