Merge branch 'public_next' into private

This commit is contained in:
Alam Ed Arias 2018-02-14 10:34:36 -05:00
commit 306cbc43e2
3 changed files with 14 additions and 18 deletions

View File

@ -4003,7 +4003,8 @@ static void HandlePacketFromPlayer(SINT8 node)
INT32 k = *txtpak++; // playernum INT32 k = *txtpak++; // playernum
const size_t txtsize = txtpak[0]+1; const size_t txtsize = txtpak[0]+1;
M_Memcpy(D_GetTextcmd(i, k), txtpak, txtsize); if (i >= gametic) // Don't copy old net commands
M_Memcpy(D_GetTextcmd(i, k), txtpak, txtsize);
txtpak += txtsize; txtpak += txtsize;
} }
} }

View File

@ -586,7 +586,6 @@ void D_RegisterServerCommands(void)
*/ */
void D_RegisterClientCommands(void) void D_RegisterClientCommands(void)
{ {
const char *username;
INT32 i; INT32 i;
for (i = 0; i < MAXSKINCOLORS; i++) for (i = 0; i < MAXSKINCOLORS; i++)
@ -644,8 +643,6 @@ void D_RegisterClientCommands(void)
#endif #endif
// register these so it is saved to config // register these so it is saved to config
if ((username = I_GetUserName()))
cv_playername.defaultvalue = cv_defaultplayername.defaultvalue = username;
CV_RegisterVar(&cv_playername); CV_RegisterVar(&cv_playername);
CV_RegisterVar(&cv_playercolor); CV_RegisterVar(&cv_playercolor);
CV_RegisterVar(&cv_skin); // r_things.c (skin NAME) CV_RegisterVar(&cv_skin); // r_things.c (skin NAME)

View File

@ -649,13 +649,12 @@ static void M_PNGhdr(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png_
static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png_byte movie) static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png_byte movie)
{ {
#ifdef PNG_TEXT_SUPPORTED #ifdef PNG_TEXT_SUPPORTED
#define SRB2PNGTXT 11 //PNG_KEYWORD_MAX_LENGTH(79) is the max #define SRB2PNGTXT 10 //PNG_KEYWORD_MAX_LENGTH(79) is the max
png_text png_infotext[SRB2PNGTXT]; png_text png_infotext[SRB2PNGTXT];
char keytxt[SRB2PNGTXT][12] = { char keytxt[SRB2PNGTXT][12] = {
"Title", "Author", "Description", "Playername", "Mapnum", "Mapname", "Title", "Description", "Playername", "Mapnum", "Mapname",
"Location", "Interface", "Revision", "Build Date", "Build Time"}; "Location", "Interface", "Revision", "Build Date", "Build Time"};
char titletxt[] = "Sonic Robo Blast 2 " VERSIONSTRING; char titletxt[] = "Sonic Robo Blast 2 " VERSIONSTRING;
png_charp authortxt = I_GetUserName();
png_charp playertxt = cv_playername.zstring; png_charp playertxt = cv_playername.zstring;
char desctxt[] = "SRB2 Screenshot"; char desctxt[] = "SRB2 Screenshot";
char Movietxt[] = "SRB2 Movie"; char Movietxt[] = "SRB2 Movie";
@ -705,19 +704,18 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
png_infotext[i].key = keytxt[i]; png_infotext[i].key = keytxt[i];
png_infotext[0].text = titletxt; png_infotext[0].text = titletxt;
png_infotext[1].text = authortxt;
if (movie) if (movie)
png_infotext[2].text = Movietxt; png_infotext[1].text = Movietxt;
else else
png_infotext[2].text = desctxt; png_infotext[1].text = desctxt;
png_infotext[3].text = playertxt; png_infotext[2].text = playertxt;
png_infotext[4].text = maptext; png_infotext[3].text = maptext;
png_infotext[5].text = lvlttltext; png_infotext[4].text = lvlttltext;
png_infotext[6].text = locationtxt; png_infotext[5].text = locationtxt;
png_infotext[7].text = interfacetxt; png_infotext[6].text = interfacetxt;
png_infotext[8].text = strncpy(ctrevision, comprevision, sizeof(ctrevision)-1); png_infotext[7].text = strncpy(ctrevision, comprevision, sizeof(ctrevision)-1);
png_infotext[9].text = strncpy(ctdate, compdate, sizeof(ctdate)-1); png_infotext[8].text = strncpy(ctdate, compdate, sizeof(ctdate)-1);
png_infotext[10].text = strncpy(cttime, comptime, sizeof(cttime)-1); png_infotext[9].text = strncpy(cttime, comptime, sizeof(cttime)-1);
png_set_text(png_ptr, png_info_ptr, png_infotext, SRB2PNGTXT); png_set_text(png_ptr, png_info_ptr, png_infotext, SRB2PNGTXT);
#undef SRB2PNGTXT #undef SRB2PNGTXT