-Fixed broken net commands, thus fixing (or at least greatly improving) chat/commands/joins/leaves and possibly other annoying bugs
-Updated packet name list so the debug file no longer shows garbage packet names -Replaced byte values with actual net command names in the debug file. Only the first net command in a packet will be shown though -Added a MOBJCONSISTANCY define that makes the game takes all revelant mobjs to be counted in the synch seed -Added a PACKETDROP define that adds two console commands "drop" and "droprate" to simulate bad internet by dropping packets -Added/changed comments here in there in the netcode -Fixed a minor error that would ignore one of the urgent ack slots -Added a space between the map name and "zone" for the messages shown in a joiner's console
This commit is contained in:
parent
d4f153d3ca
commit
b347b818e7
10
src/Makefile
10
src/Makefile
|
@ -366,6 +366,14 @@ endif
|
||||||
|
|
||||||
OPTS:=-fno-exceptions $(OPTS)
|
OPTS:=-fno-exceptions $(OPTS)
|
||||||
|
|
||||||
|
ifdef MOBJCONSISTANCY
|
||||||
|
OPTS+=-DMOBJCONSISTANCY
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef PACKETDROP
|
||||||
|
OPTS+=-DPACKETDROP
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef DEBUGMODE
|
ifdef DEBUGMODE
|
||||||
|
|
||||||
# build with debugging information
|
# build with debugging information
|
||||||
|
@ -375,7 +383,7 @@ ifdef GCC48
|
||||||
else
|
else
|
||||||
CFLAGS+=-O0
|
CFLAGS+=-O0
|
||||||
endif
|
endif
|
||||||
CFLAGS+= -Wall -DPARANOIA -DRANGECHECK
|
CFLAGS+= -Wall -DPARANOIA -DRANGECHECK -DPACKETDROP -DMOBJCONSISTANCY
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2781,7 +2781,6 @@ void D_ClientServerInit(void)
|
||||||
COM_AddCommand("reloadbans", Command_ReloadBan);
|
COM_AddCommand("reloadbans", Command_ReloadBan);
|
||||||
COM_AddCommand("connect", Command_connect);
|
COM_AddCommand("connect", Command_connect);
|
||||||
COM_AddCommand("nodes", Command_Nodes);
|
COM_AddCommand("nodes", Command_Nodes);
|
||||||
#define PACKETDROP
|
|
||||||
#ifdef PACKETDROP
|
#ifdef PACKETDROP
|
||||||
COM_AddCommand("drop", Command_Drop);
|
COM_AddCommand("drop", Command_Drop);
|
||||||
COM_AddCommand("droprate", Command_Droprate);
|
COM_AddCommand("droprate", Command_Droprate);
|
||||||
|
@ -3911,8 +3910,10 @@ static INT16 Consistancy(void)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
UINT32 ret = 0;
|
UINT32 ret = 0;
|
||||||
|
#ifdef MOBJCONSISTANCY
|
||||||
thinker_t *th;
|
thinker_t *th;
|
||||||
mobj_t *mo;
|
mobj_t *mo;
|
||||||
|
#endif
|
||||||
|
|
||||||
DEBFILE(va("TIC %u ", gametic));
|
DEBFILE(va("TIC %u ", gametic));
|
||||||
|
|
||||||
|
@ -3934,8 +3935,8 @@ static INT16 Consistancy(void)
|
||||||
if (!G_PlatformGametype())
|
if (!G_PlatformGametype())
|
||||||
ret += P_GetRandSeed();
|
ret += P_GetRandSeed();
|
||||||
|
|
||||||
// !!!
|
#ifdef MOBJCONSISTANCY
|
||||||
/*if (!thinkercap.next)
|
if (!thinkercap.next)
|
||||||
return ret;
|
return ret;
|
||||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||||
{
|
{
|
||||||
|
@ -4002,7 +4003,8 @@ static INT16 Consistancy(void)
|
||||||
ret -= mo->sprite;
|
ret -= mo->sprite;
|
||||||
ret += mo->frame;
|
ret += mo->frame;
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return (INT16)(ret & 0xFFFF);
|
return (INT16)(ret & 0xFFFF);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,6 @@ typedef enum
|
||||||
NUMPACKETTYPE
|
NUMPACKETTYPE
|
||||||
} packettype_t;
|
} packettype_t;
|
||||||
|
|
||||||
#define PACKETDROP
|
|
||||||
|
|
||||||
#ifdef PACKETDROP
|
#ifdef PACKETDROP
|
||||||
void Command_Drop(void);
|
void Command_Drop(void);
|
||||||
void Command_Droprate(void);
|
void Command_Droprate(void);
|
||||||
|
|
|
@ -878,8 +878,6 @@ static void DebugPrintpacket(const char *header)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PACKETDROP
|
|
||||||
|
|
||||||
#ifdef PACKETDROP
|
#ifdef PACKETDROP
|
||||||
static INT32 packetdropquantity[NUMPACKETTYPE] = {0};
|
static INT32 packetdropquantity[NUMPACKETTYPE] = {0};
|
||||||
static INT32 packetdroprate = 0;
|
static INT32 packetdroprate = 0;
|
||||||
|
|
Loading…
Reference in New Issue