mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-17 10:11:02 +00:00
Merge branch 'master' into minor-net-command-fixes
This commit is contained in:
commit
d1e3275c78
4 changed files with 18 additions and 18 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
26
src/m_misc.c
26
src/m_misc.c
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue