mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
-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
4 changed files with 15 additions and 9 deletions
10
src/Makefile
10
src/Makefile
|
@ -366,6 +366,14 @@ endif
|
|||
|
||||
OPTS:=-fno-exceptions $(OPTS)
|
||||
|
||||
ifdef MOBJCONSISTANCY
|
||||
OPTS+=-DMOBJCONSISTANCY
|
||||
endif
|
||||
|
||||
ifdef PACKETDROP
|
||||
OPTS+=-DPACKETDROP
|
||||
endif
|
||||
|
||||
ifdef DEBUGMODE
|
||||
|
||||
# build with debugging information
|
||||
|
@ -375,7 +383,7 @@ ifdef GCC48
|
|||
else
|
||||
CFLAGS+=-O0
|
||||
endif
|
||||
CFLAGS+= -Wall -DPARANOIA -DRANGECHECK
|
||||
CFLAGS+= -Wall -DPARANOIA -DRANGECHECK -DPACKETDROP -DMOBJCONSISTANCY
|
||||
else
|
||||
|
||||
|
||||
|
|
|
@ -2781,7 +2781,6 @@ void D_ClientServerInit(void)
|
|||
COM_AddCommand("reloadbans", Command_ReloadBan);
|
||||
COM_AddCommand("connect", Command_connect);
|
||||
COM_AddCommand("nodes", Command_Nodes);
|
||||
#define PACKETDROP
|
||||
#ifdef PACKETDROP
|
||||
COM_AddCommand("drop", Command_Drop);
|
||||
COM_AddCommand("droprate", Command_Droprate);
|
||||
|
@ -3911,8 +3910,10 @@ static INT16 Consistancy(void)
|
|||
{
|
||||
INT32 i;
|
||||
UINT32 ret = 0;
|
||||
#ifdef MOBJCONSISTANCY
|
||||
thinker_t *th;
|
||||
mobj_t *mo;
|
||||
#endif
|
||||
|
||||
DEBFILE(va("TIC %u ", gametic));
|
||||
|
||||
|
@ -3934,8 +3935,8 @@ static INT16 Consistancy(void)
|
|||
if (!G_PlatformGametype())
|
||||
ret += P_GetRandSeed();
|
||||
|
||||
// !!!
|
||||
/*if (!thinkercap.next)
|
||||
#ifdef MOBJCONSISTANCY
|
||||
if (!thinkercap.next)
|
||||
return ret;
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
{
|
||||
|
@ -4002,7 +4003,8 @@ static INT16 Consistancy(void)
|
|||
ret -= mo->sprite;
|
||||
ret += mo->frame;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
|
||||
return (INT16)(ret & 0xFFFF);
|
||||
}
|
||||
|
|
|
@ -76,8 +76,6 @@ typedef enum
|
|||
NUMPACKETTYPE
|
||||
} packettype_t;
|
||||
|
||||
#define PACKETDROP
|
||||
|
||||
#ifdef PACKETDROP
|
||||
void Command_Drop(void);
|
||||
void Command_Droprate(void);
|
||||
|
|
|
@ -878,8 +878,6 @@ static void DebugPrintpacket(const char *header)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define PACKETDROP
|
||||
|
||||
#ifdef PACKETDROP
|
||||
static INT32 packetdropquantity[NUMPACKETTYPE] = {0};
|
||||
static INT32 packetdroprate = 0;
|
||||
|
|
Loading…
Reference in a new issue