diff --git a/src/d_clisrv.c b/src/d_clisrv.c index a00bd4033..2da326392 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -153,7 +153,7 @@ static boolean cl_redownloadinggamestate = false; static UINT8 localtextcmd[MAXSPLITSCREENPLAYERS][MAXTEXTCMD]; static tic_t neededtic; SINT8 servernode = 0; // the number of the server node -char connectedservername[MAXSERVERNAME]; +char connectedservername[MAXSERVERNAME+1]; /// \brief do we accept new players? /// \todo WORK! boolean acceptnewnode = true; diff --git a/src/d_clisrv.h b/src/d_clisrv.h index d915f3492..25899b77c 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -439,7 +439,7 @@ extern boolean dedicated; // For dedicated server extern UINT16 software_MAXPACKETLENGTH; extern boolean acceptnewnode; extern SINT8 servernode; -extern char connectedservername[MAXSERVERNAME]; +extern char connectedservername[MAXSERVERNAME+1]; void Command_Ping_f(void); extern tic_t connectiontimeout; diff --git a/src/d_netcmd.c b/src/d_netcmd.c index f5bb24902..457d6c386 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -75,8 +75,6 @@ #include "discord.h" #endif -extern consvar_t cv_showgremlins; - // ------ // protos // ------ diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 4d0bb713f..cbe432287 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -21,6 +21,8 @@ extern "C" { #endif +extern consvar_t cv_showgremlins; + // console vars extern consvar_t cv_playername[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_playercolor[MAXSPLITSCREENPLAYERS]; diff --git a/src/g_demo.c b/src/g_demo.c index 25a54185c..b5973eda8 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -3827,9 +3827,6 @@ void G_SaveDemo(void) { UINT8 *p = demobuf.buffer+16; // after version UINT32 length; -#ifdef NOMD5 - UINT8 i; -#endif // Ensure extrainfo pointer is always available, even if no info is present. if (demoinfo_p && *(UINT32 *)demoinfo_p == 0) @@ -3886,7 +3883,7 @@ void G_SaveDemo(void) // Doesn't seem like I can use WriteDemoChecksum here, correct me if I'm wrong -Sal #ifdef NOMD5 - for (i = 0; i < 16; i++, p++) + for (UINT8 i = 0; i < 16; i++, p++) *p = M_RandomByte(); // This MD5 was chosen by fair dice roll and most likely < 50% correct. #else // Make a checksum of everything after the checksum in the file up to the end of the standard data. Extrainfo is freely modifiable. diff --git a/src/p_map.c b/src/p_map.c index 3aaf7d78b..151005022 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3603,8 +3603,6 @@ papercollision: static void P_BouncePlayerMove(mobj_t *mo, TryMoveResult_t *result) { - extern consvar_t cv_showgremlins; - fixed_t mmomx = 0, mmomy = 0; fixed_t oldmomx = mo->momx, oldmomy = mo->momy; diff --git a/src/p_spec.c b/src/p_spec.c index 699ec8379..b2b562be3 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3011,10 +3011,12 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha case 423: // Change Sky if ((mo && mo->player && P_IsLocalPlayer(mo->player)) || args[1]) + { if (udmf) P_SetupLevelSky(stringargs[0], args[1]); else P_SetupLevelSky(va("SKY%d", args[0]), args[1]); + } break; case 424: // Change Weather diff --git a/src/r_things.cpp b/src/r_things.cpp index b18f8f3aa..2729b269e 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -3381,30 +3381,30 @@ void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, portal_t* portal) if (ds->portalpass > 0 && ds->portalpass <= portalrender) continue; // is a portal - if (ds->scale1 > ds->scale2) - { - lowscale = ds->scale2; - scale = ds->scale1; - } - else - { - lowscale = ds->scale1; - scale = ds->scale2; - } + if (ds->scale1 > ds->scale2) + { + lowscale = ds->scale2; + scale = ds->scale1; + } + else + { + lowscale = ds->scale1; + scale = ds->scale2; + } - if (scale < spr->sortscale || - (lowscale < spr->sortscale && - !R_PointOnSegSide (spr->gx, spr->gy, ds->curline))) - { - // masked mid texture? - /* - * if (ds->maskedtexturecol) - * R_RenderMaskedSegRange (ds, r1, r2); - */ + if (scale < spr->sortscale || + (lowscale < spr->sortscale && + !R_PointOnSegSide (spr->gx, spr->gy, ds->curline))) + { + // masked mid texture? + /* + * if (ds->maskedtexturecol) + * R_RenderMaskedSegRange (ds, r1, r2); + */ - // seg is behind sprite - continue; - } + // seg is behind sprite + continue; + } } r1 = ds->x1 < x1 ? x1 : ds->x1; diff --git a/src/st_stuff.c b/src/st_stuff.c index 5c077a78a..eaa355a45 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -377,7 +377,7 @@ static void ST_pushDebugString(INT32 *height, const char *string) *height -= 8; } -static void ST_pushDebugTimeMS(INT32 *height, const char *label, UINT32 ms) +/*static void ST_pushDebugTimeMS(INT32 *height, const char *label, UINT32 ms) { ST_pushDebugString(height, va("%s%02d:%05.2f", label, ms / 60000, ms % 60000 / 1000.f)); @@ -423,7 +423,7 @@ static void ST_drawMusicDebug(INT32 *height) } ST_pushDebugString(height, va(" Song: %8s", mname)); -} +}*/ static void ST_drawRenderDebug(INT32 *height) { @@ -437,7 +437,7 @@ static void ST_drawRenderDebug(INT32 *height) ST_pushDebugString(height, va("Skybox Portals: %4s", sizeu1(i->skybox_portals))); } -void ST_drawDebugInfo(void) +static void ST_drawDebugInfo(void) { INT32 height = 192;