Merge branch 'master' into minor-net-command-fixes

This commit is contained in:
LJSonik 2018-02-14 21:07:10 +01:00 committed by GitHub
commit d1e3275c78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 18 deletions

View file

@ -3983,7 +3983,8 @@ FILESTAMP
INT32 k = *txtpak++; // playernum
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;
}
}

View file

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

View file

@ -644,13 +644,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)
{
#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];
char keytxt[SRB2PNGTXT][12] = {
"Title", "Author", "Description", "Playername", "Mapnum", "Mapname",
"Title", "Description", "Playername", "Mapnum", "Mapname",
"Location", "Interface", "Revision", "Build Date", "Build Time"};
char titletxt[] = "Sonic Robo Blast 2 " VERSIONSTRING;
png_charp authortxt = I_GetUserName();
png_charp playertxt = cv_playername.zstring;
char desctxt[] = "SRB2 Screenshot";
char Movietxt[] = "SRB2 Movie";
@ -700,19 +699,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[0].text = titletxt;
png_infotext[1].text = authortxt;
if (movie)
png_infotext[2].text = Movietxt;
png_infotext[1].text = Movietxt;
else
png_infotext[2].text = desctxt;
png_infotext[3].text = playertxt;
png_infotext[4].text = maptext;
png_infotext[5].text = lvlttltext;
png_infotext[6].text = locationtxt;
png_infotext[7].text = interfacetxt;
png_infotext[8].text = strncpy(ctrevision, comprevision, sizeof(ctrevision)-1);
png_infotext[9].text = strncpy(ctdate, compdate, sizeof(ctdate)-1);
png_infotext[10].text = strncpy(cttime, comptime, sizeof(cttime)-1);
png_infotext[1].text = desctxt;
png_infotext[2].text = playertxt;
png_infotext[3].text = maptext;
png_infotext[4].text = lvlttltext;
png_infotext[5].text = locationtxt;
png_infotext[6].text = interfacetxt;
png_infotext[7].text = strncpy(ctrevision, comprevision, sizeof(ctrevision)-1);
png_infotext[8].text = strncpy(ctdate, compdate, sizeof(ctdate)-1);
png_infotext[9].text = strncpy(cttime, comptime, sizeof(cttime)-1);
png_set_text(png_ptr, png_info_ptr, png_infotext, SRB2PNGTXT);
#undef SRB2PNGTXT

View file

@ -103,6 +103,10 @@ static inline VOID MakeCodeWritable(VOID)
\return int
*/
#if defined (__GNUC__) && (__GNUC__ >= 4)
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#endif
#ifdef FORCESDLMAIN
int SDL_main(int argc, char **argv)
#else