Fix compile warnings

This commit is contained in:
fickleheart 2019-02-06 21:03:05 -06:00
parent 6da810a994
commit dd75c1621c
2 changed files with 6 additions and 5 deletions

View File

@ -6113,7 +6113,7 @@ void G_DoPlayDemo(char *defdemoname)
UINT8 i, p;
lumpnum_t l;
char skin[17],color[17],*n,*pdemoname;
UINT8 version,subversion,kartspeed,kartweight;
UINT8 version,subversion,kartspeed=5,kartweight=5;
UINT32 randseed;
char msg[1024];
#if defined(SKIPERRORS) && !defined(DEVELOP)
@ -6342,7 +6342,6 @@ void G_DoPlayDemo(char *defdemoname)
playeringame[0] = !multiplayer;
if (multiplayer) {
player_t *player;
boolean spectator;
// Load players that were in-game when the map started

View File

@ -65,6 +65,10 @@
#include "lua_script.h"
#include "lua_hook.h"
#if !defined (UNDER_CE)
#include <time.h>
#endif
#if defined (_WIN32) || defined (_WIN32_WCE)
#include <malloc.h>
#include <math.h>
@ -3161,10 +3165,8 @@ boolean P_SetupLevel(boolean skipprecip)
//@TODO NET REPLAYS NEED BETTER FILE NAMING STUFF. ALSO OPTIONS. FUCK.
if (!demoplayback && multiplayer) {
// lol sorry
#include "time.h"
static char buf[256];
sprintf(buf, "replay"PATHSEP"online"PATHSEP"%d-%s", time(NULL), G_BuildMapName(gamemap));
sprintf(buf, "replay"PATHSEP"online"PATHSEP"%d-%s", (int) (time(NULL)), G_BuildMapName(gamemap));
I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755);
I_mkdir(va("%s"PATHSEP"replay"PATHSEP"online", srb2home), 0755);