Skip to content
Snippets Groups Projects
Commit ddf8a189 authored by Lactozilla's avatar Lactozilla :speech_balloon:
Browse files

Increase size of mapname in serverinfo_pak

parent a2e08d95
Branches
No related tags found
1 merge request!2248Custom map names
Pipeline #2493 passed
......@@ -26,7 +26,7 @@ packet versions.
If you change the struct or the meaning of a field
therein, increment this number.
*/
#define PACKETVERSION 5
#define PACKETVERSION 6
// Network play related stuff.
// There is a data struct that stores network
......@@ -226,7 +226,7 @@ typedef struct
tic_t time;
tic_t leveltime;
char servername[MAXSERVERNAME];
char mapname[8];
char mapname[24];
char maptitle[33];
unsigned char mapmd5[16];
UINT8 actnum;
......
......@@ -114,15 +114,15 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
netbuffer->u.serverinfo.refusereason = GetRefuseReason(node);
strncpy(netbuffer->u.serverinfo.gametypename, Gametype_Names[gametype],
strlcpy(netbuffer->u.serverinfo.gametypename, Gametype_Names[gametype],
sizeof netbuffer->u.serverinfo.gametypename);
netbuffer->u.serverinfo.modifiedgame = (UINT8)modifiedgame;
netbuffer->u.serverinfo.cheatsenabled = CV_CheatsEnabled();
netbuffer->u.serverinfo.flags = (dedicated ? SV_DEDICATED : 0);
strncpy(netbuffer->u.serverinfo.servername, cv_servername.string,
strlcpy(netbuffer->u.serverinfo.servername, cv_servername.string,
MAXSERVERNAME);
strncpy(netbuffer->u.serverinfo.mapname, G_BuildMapName(gamemap), 7); // [mapnames] FIXME
strlcpy(netbuffer->u.serverinfo.mapname, G_BuildMapName(gamemap), sizeof netbuffer->u.serverinfo.mapname);
M_Memcpy(netbuffer->u.serverinfo.mapmd5, mapmd5, 16);
memset(netbuffer->u.serverinfo.maptitle, 0, sizeof netbuffer->u.serverinfo.maptitle);
......@@ -142,7 +142,6 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
read++;
}
*writ = '\0';
//strncpy(netbuffer->u.serverinfo.maptitle, (char *)mapheaderinfo[gamemap-1]->lvlttl, 33);
}
else
strncpy(netbuffer->u.serverinfo.maptitle, "UNKNOWN", 32);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment