Remove outdated or misleading comments

This commit is contained in:
LJ Sonic 2023-01-08 00:43:18 +01:00
parent 39556e8af7
commit 94761d3a55
5 changed files with 21 additions and 46 deletions

View file

@ -36,7 +36,7 @@ cl_mode_t cl_mode = CL_SEARCHING;
static UINT16 cl_lastcheckedfilecount = 0; // used for full file list static UINT16 cl_lastcheckedfilecount = 0; // used for full file list
boolean serverisfull = false; //lets us be aware if the server was full after we check files, but before downloading, so we can ask if the user still wants to download or not boolean serverisfull = false; //lets us be aware if the server was full after we check files, but before downloading, so we can ask if the user still wants to download or not
tic_t firstconnectattempttime = 0; tic_t firstconnectattempttime = 0;
UINT8 mynode; // my address pointofview server UINT8 mynode;
static void *snake = NULL; static void *snake = NULL;
static void CL_DrawConnectionStatusBox(void) static void CL_DrawConnectionStatusBox(void)
@ -226,12 +226,9 @@ static boolean CL_AskFileList(INT32 firstfile)
return HSendPacket(servernode, false, 0, sizeof (INT32)); return HSendPacket(servernode, false, 0, sizeof (INT32));
} }
/** Sends a special packet to declare how many players in local /** Sends a PT_CLIENTJOIN packet to the server
* Used only in arbitratrenetstart()
* Sends a PT_CLIENTJOIN packet to the server
* *
* \return True if the packet was successfully sent * \return True if the packet was successfully sent
* \todo Improve the description...
* *
*/ */
boolean CL_SendJoin(void) boolean CL_SendJoin(void)
@ -928,10 +925,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
if (client && (cl_mode == CL_DOWNLOADFILES || cl_mode == CL_DOWNLOADSAVEGAME)) if (client && (cl_mode == CL_DOWNLOADFILES || cl_mode == CL_DOWNLOADSAVEGAME))
FileReceiveTicker(); FileReceiveTicker();
// why are these here? this is for servers, we're a client
//if (key == 's' && server)
// doomcom->numnodes = (INT16)pnumnodes;
//FileSendTicker();
*oldtic = I_GetTime(); *oldtic = I_GetTime();
if (client && cl_mode != CL_CONNECTED && cl_mode != CL_ABORTED) if (client && cl_mode != CL_CONNECTED && cl_mode != CL_ABORTED)

View file

@ -99,13 +99,8 @@ boolean adminpasswordset = false;
tic_t neededtic; tic_t neededtic;
SINT8 servernode = 0; // the number of the server node SINT8 servernode = 0; // the number of the server node
/// \brief do we accept new players?
/// \todo WORK!
boolean acceptnewnode = true; boolean acceptnewnode = true;
// Some software don't support largest packet
// (original sersetup, not exactely, but the probability of sending a packet
// of 512 bytes is like 0.1)
UINT16 software_MAXPACKETLENGTH; UINT16 software_MAXPACKETLENGTH;
typedef struct banreason_s typedef struct banreason_s
@ -300,9 +295,6 @@ static void Command_connect(void)
return; return;
} }
// modified game check: no longer handled
// we don't request a restart unless the filelist differs
server = false; server = false;
/* /*
if (!stricmp(COM_Argv(1), "self")) if (!stricmp(COM_Argv(1), "self"))
@ -1768,7 +1760,7 @@ boolean TryRunTics(tic_t realtics)
boolean ticking; boolean ticking;
// the machine has lagged but it is not so bad // the machine has lagged but it is not so bad
if (realtics > TICRATE/7) // FIXME: consistency failure!! if (realtics > TICRATE/7)
{ {
if (server) if (server)
realtics = 1; realtics = 1;
@ -1802,8 +1794,6 @@ boolean TryRunTics(tic_t realtics)
#ifdef DEBUGFILE #ifdef DEBUGFILE
if (debugfile && (realtics || neededtic > gametic)) if (debugfile && (realtics || neededtic > gametic))
{ {
//SoM: 3/30/2000: Need long INT32 in the format string for args 4 & 5.
//Shut up stupid warning!
fprintf(debugfile, "------------ Tryruntic: REAL:%d NEED:%d GAME:%d LOAD: %d\n", fprintf(debugfile, "------------ Tryruntic: REAL:%d NEED:%d GAME:%d LOAD: %d\n",
realtics, neededtic, gametic, debugload); realtics, neededtic, gametic, debugload);
debugload = 100000; debugload = 100000;
@ -1983,7 +1973,7 @@ void NetUpdate(void)
if (client) if (client)
maketic = neededtic; maketic = neededtic;
Local_Maketic(realtics); // make local tic, and call menu? Local_Maketic(realtics);
if (server) if (server)
CL_SendClientCmd(); // send it CL_SendClientCmd(); // send it

View file

@ -294,25 +294,25 @@ typedef struct
UINT8 reserved; // Padding UINT8 reserved; // Padding
union union
{ {
clientcmd_pak clientpak; // 144 bytes clientcmd_pak clientpak;
client2cmd_pak client2pak; // 200 bytes client2cmd_pak client2pak;
servertics_pak serverpak; // 132495 bytes (more around 360, no?) servertics_pak serverpak;
serverconfig_pak servercfg; // 773 bytes serverconfig_pak servercfg;
UINT8 textcmd[MAXTEXTCMD+1]; // 66049 bytes (wut??? 64k??? More like 257 bytes...) UINT8 textcmd[MAXTEXTCMD+1];
filetx_pak filetxpak; // 139 bytes filetx_pak filetxpak;
fileack_pak fileack; fileack_pak fileack;
UINT8 filereceived; UINT8 filereceived;
clientconfig_pak clientcfg; // 136 bytes clientconfig_pak clientcfg;
UINT8 md5sum[16]; UINT8 md5sum[16];
serverinfo_pak serverinfo; // 1024 bytes serverinfo_pak serverinfo;
serverrefuse_pak serverrefuse; // 65025 bytes (somehow I feel like those values are garbage...) serverrefuse_pak serverrefuse;
askinfo_pak askinfo; // 61 bytes askinfo_pak askinfo;
msaskinfo_pak msaskinfo; // 22 bytes msaskinfo_pak msaskinfo;
plrinfo_pak playerinfo[MAXPLAYERS]; // 576 bytes(?) plrinfo_pak playerinfo[MAXPLAYERS];
plrconfig_pak playerconfig[MAXPLAYERS]; // (up to) 528 bytes(?) plrconfig_pak playerconfig[MAXPLAYERS];
INT32 filesneedednum; // 4 bytes INT32 filesneedednum;
filesneededconfig_pak filesneededcfg; // ??? bytes filesneededconfig_pak filesneededcfg;
UINT32 pingtable[MAXPLAYERS+1]; // 68 bytes UINT32 pingtable[MAXPLAYERS+1];
} u; // This is needed to pack diff packet types data together } u; // This is needed to pack diff packet types data together
} ATTRPACK doomdata_t; } ATTRPACK doomdata_t;

View file

@ -460,7 +460,7 @@ void PT_Connect(SINT8 node)
ResetNode(node); ResetNode(node);
SV_SendRefuse(node, M_GetText("Server couldn't send info, please try again")); SV_SendRefuse(node, M_GetText("Server couldn't send info, please try again"));
/// \todo fix this !!! /// \todo fix this !!!
return; // restart the while return;
} }
DEBFILE("new node joined\n"); DEBFILE("new node joined\n");

View file

@ -262,11 +262,6 @@ void PT_ServerTics(SINT8 node, INT32 netconsole)
else else
{ {
DEBFILE(va("frame not in bound: %u\n", neededtic)); DEBFILE(va("frame not in bound: %u\n", neededtic));
/*if (realend < neededtic - 2 * TICRATE || neededtic + 2 * TICRATE < realstart)
I_Error("Received an out of order PT_SERVERTICS packet!\n"
"Got tics %d-%d, needed tic %d\n\n"
"Please report this crash on the Master Board,\n"
"IRC or Discord so it can be fixed.\n", (INT32)realstart, (INT32)realend, (INT32)neededtic);*/
} }
} }
@ -447,9 +442,6 @@ void SV_SendTics(void)
netnodes[0].supposedtic = maketic; netnodes[0].supposedtic = maketic;
} }
//
// TryRunTics
//
void Local_Maketic(INT32 realtics) void Local_Maketic(INT32 realtics)
{ {
I_OsPolling(); // I_Getevent I_OsPolling(); // I_Getevent