ref: 9c76e770d6104b0d23a28d228715dc4cd9f84722
parent: e5d5a0930ea060f7908f64ab93e04cd08e21d355
author: Thomas A. Birkel <capnclever@gmail.com>
date: Tue Oct 18 20:27:12 EDT 2016
Update branch with requested changes Improve indentation and comments, use M_ParmExists() instead of M_CheckParam().
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -1037,7 +1037,7 @@
// Record a high turning resolution demo.
//
- longtics = M_CheckParm("-longtics") != 0;+ longtics = M_ParmExists("-longtics");//!
// @category demo
@@ -1046,7 +1046,7 @@
// after level exit.
//
- demoextend = M_CheckParm("-demoextend");+ demoextend = M_ParmExists("-demoextend"); if (W_CheckNumForName(DEH_String("E2M1")) == -1) {--- a/src/heretic/d_net.c
+++ b/src/heretic/d_net.c
@@ -123,7 +123,7 @@
if (lowres_turn)
{ printf("NOTE: Turning resolution is reduced; this is probably "- "because there is a client recording a Vanilla demo.\n");
+ "because there is a client recording a Vanilla demo.\n");
}
for (i = 0; i < MAXPLAYERS; ++i)
@@ -150,8 +150,8 @@
settings->respawn_monsters = respawnparm;
settings->timelimit = 0;
- settings->lowres_turn = M_CheckParm("-record") > 0- && M_CheckParm("-longtics") == 0;+ settings->lowres_turn = M_ParmExists("-record")+ && !M_ParmExists("-longtics");}
static void InitConnectData(net_connect_data_t *connect_data)
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -1322,7 +1322,8 @@
{int i;
- if (!demoextend && G_CheckDemoStatus()) // quit demo unless -demoextend
+ // quit demo unless -demoextend
+ if (!demoextend && G_CheckDemoStatus())
return;
if (!netgame)
gameaction = ga_loadlevel; // reload the level from scratch
@@ -1391,7 +1392,9 @@
static int afterSecret[5] = { 7, 5, 5, 5, 4 };gameaction = ga_nothing;
- if (!demoextend && G_CheckDemoStatus()) // quit demo unless -demoextend
+
+ // quit demo unless -demoextend
+ if (!demoextend && G_CheckDemoStatus())
{return;
}
--- a/src/hexen/d_net.c
+++ b/src/hexen/d_net.c
@@ -124,7 +124,7 @@
if (lowres_turn)
{ printf("NOTE: Turning resolution is reduced; this is probably "- "because there is a client recording a Vanilla demo.\n");
+ "because there is a client recording a Vanilla demo.\n");
}
for (i=0; i<maxplayers; ++i)
@@ -162,8 +162,8 @@
settings->respawn_monsters = respawnparm;
settings->timelimit = 0;
- settings->lowres_turn = M_CheckParm("-record") > 0- && M_CheckParm("-longtics") == 0;+ settings->lowres_turn = M_ParmExists("-record")+ && !M_ParmExists("-longtics");}
static void InitConnectData(net_connect_data_t *connect_data)
--- a/src/hexen/g_game.c
+++ b/src/hexen/g_game.c
@@ -1325,7 +1325,8 @@
boolean foundSpot;
int bestWeapon;
- if (!demoextend && G_CheckDemoStatus()) // quit demo unless -demoextend
+ // quit demo unless -demoextend
+ if (!demoextend && G_CheckDemoStatus())
{return;
}
@@ -1520,7 +1521,9 @@
int i;
gameaction = ga_nothing;
- if (!demoextend && G_CheckDemoStatus()) // quit demo unless -demoextend
+
+ // quit demo unless -demoextend
+ if (!demoextend && G_CheckDemoStatus())
{return;
}
@@ -1771,9 +1774,11 @@
}
// Set up a bunch of globals
- if (!demoextend) // this prevents map-loading from stopping the demo
- { // demoextend is set back to false only if starting a- // new game or loading a saved one during playback
+ if (!demoextend)
+ {+ // This prevents map-loading from interrupting a demo.
+ // demoextend is set back to false only if starting a new game or
+ // loading a saved one from the menu, and only during playback.
demorecording = false;
demoplayback = false;
usergame = true; // will be set false if a demo
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -682,7 +682,7 @@
// Record a high turning resolution demo.
//
- longtics = M_CheckParm("-longtics") != 0;+ longtics = M_ParmExists("-longtics");//!
// @category demo
@@ -691,7 +691,7 @@
// after level exit.
//
- demoextend = M_CheckParm("-demoextend");+ demoextend = M_ParmExists("-demoextend"); if (M_ParmExists("-testcontrols")) {--
⑨