mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 12:50:44 +00:00
Merge branch 'netcode-fixes-the-sequel' into 'next'
Netcode fixes the sequel See merge request !207
This commit is contained in:
commit
829328637d
4 changed files with 22 additions and 1 deletions
|
@ -1180,7 +1180,10 @@ finish:
|
||||||
CONS_Printf(M_GetText("%s set to %s\n"), var->name, var->string);
|
CONS_Printf(M_GetText("%s set to %s\n"), var->name, var->string);
|
||||||
var->flags &= ~CV_SHOWMODIFONETIME;
|
var->flags &= ~CV_SHOWMODIFONETIME;
|
||||||
}
|
}
|
||||||
|
else // display message in debug file only
|
||||||
|
{
|
||||||
DEBFILE(va("%s set to %s\n", var->name, var->string));
|
DEBFILE(va("%s set to %s\n", var->name, var->string));
|
||||||
|
}
|
||||||
var->flags |= CV_MODIFIED;
|
var->flags |= CV_MODIFIED;
|
||||||
// raise 'on change' code
|
// raise 'on change' code
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
|
|
|
@ -4115,7 +4115,10 @@ static INT16 Consistancy(void)
|
||||||
|
|
||||||
#ifdef MOBJCONSISTANCY
|
#ifdef MOBJCONSISTANCY
|
||||||
if (!thinkercap.next)
|
if (!thinkercap.next)
|
||||||
|
{
|
||||||
|
DEBFILE(va("Consistancy = %u\n", ret));
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||||
{
|
{
|
||||||
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
||||||
|
@ -4184,6 +4187,8 @@ static INT16 Consistancy(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
DEBFILE(va("Consistancy = %u\n", (ret & 0xFFFF)));
|
||||||
|
|
||||||
return (INT16)(ret & 0xFFFF);
|
return (INT16)(ret & 0xFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1028,6 +1028,7 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
netbuffer->ack = netbuffer->ackreturn = 0; // don't hold over values from last packet sent/received
|
||||||
M_Memcpy(&reboundstore[rebound_head], netbuffer,
|
M_Memcpy(&reboundstore[rebound_head], netbuffer,
|
||||||
doomcom->datalength);
|
doomcom->datalength);
|
||||||
reboundsize[rebound_head] = doomcom->datalength;
|
reboundsize[rebound_head] = doomcom->datalength;
|
||||||
|
|
|
@ -1653,12 +1653,18 @@ static inline void SaveWhatThinker(const thinker_t *th, const UINT8 type)
|
||||||
static void P_NetArchiveThinkers(void)
|
static void P_NetArchiveThinkers(void)
|
||||||
{
|
{
|
||||||
const thinker_t *th;
|
const thinker_t *th;
|
||||||
|
UINT32 numsaved = 0;
|
||||||
|
|
||||||
WRITEUINT32(save_p, ARCHIVEBLOCK_THINKERS);
|
WRITEUINT32(save_p, ARCHIVEBLOCK_THINKERS);
|
||||||
|
|
||||||
// save off the current thinkers
|
// save off the current thinkers
|
||||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||||
{
|
{
|
||||||
|
if (!(th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed
|
||||||
|
|| th->function.acp1 == (actionf_p1)P_RainThinker
|
||||||
|
|| th->function.acp1 == (actionf_p1)P_SnowThinker))
|
||||||
|
numsaved++;
|
||||||
|
|
||||||
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
||||||
{
|
{
|
||||||
SaveMobjThinker(th, tc_mobj);
|
SaveMobjThinker(th, tc_mobj);
|
||||||
|
@ -1846,6 +1852,8 @@ static void P_NetArchiveThinkers(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CONS_Debug(DBG_NETPLAY, "%u thinkers saved\n", numsaved);
|
||||||
|
|
||||||
WRITEUINT8(save_p, tc_end);
|
WRITEUINT8(save_p, tc_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2610,6 +2618,7 @@ static void P_NetUnArchiveThinkers(void)
|
||||||
UINT8 tclass;
|
UINT8 tclass;
|
||||||
UINT8 restoreNum = false;
|
UINT8 restoreNum = false;
|
||||||
UINT32 i;
|
UINT32 i;
|
||||||
|
UINT32 numloaded = 0;
|
||||||
|
|
||||||
if (READUINT32(save_p) != ARCHIVEBLOCK_THINKERS)
|
if (READUINT32(save_p) != ARCHIVEBLOCK_THINKERS)
|
||||||
I_Error("Bad $$$.sav at archive block Thinkers");
|
I_Error("Bad $$$.sav at archive block Thinkers");
|
||||||
|
@ -2643,6 +2652,7 @@ static void P_NetUnArchiveThinkers(void)
|
||||||
|
|
||||||
if (tclass == tc_end)
|
if (tclass == tc_end)
|
||||||
break; // leave the saved thinker reading loop
|
break; // leave the saved thinker reading loop
|
||||||
|
numloaded++;
|
||||||
|
|
||||||
switch (tclass)
|
switch (tclass)
|
||||||
{
|
{
|
||||||
|
@ -2794,6 +2804,8 @@ static void P_NetUnArchiveThinkers(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CONS_Debug(DBG_NETPLAY, "%u thinkers loaded\n", numloaded);
|
||||||
|
|
||||||
if (restoreNum)
|
if (restoreNum)
|
||||||
{
|
{
|
||||||
executor_t *delay = NULL;
|
executor_t *delay = NULL;
|
||||||
|
|
Loading…
Reference in a new issue