Skip to content

Commit

Permalink
Add -shorttics command line option
Browse files Browse the repository at this point in the history
  • Loading branch information
JNechaevsky committed Apr 5, 2023
1 parent 1c64699 commit b53e7c1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 16 additions & 4 deletions src/doom/d_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,15 @@ static void SaveGameSettings(net_gamesettings_t *settings)
settings->respawn_monsters = respawnparm;
settings->timelimit = timelimit;

settings->lowres_turn = M_CheckParm("-record") > 0
&& M_CheckParm("-longtics") == 0;
settings->lowres_turn = (M_ParmExists("-record")
&& !M_ParmExists("-longtics"))
|| M_ParmExists("-shorttics");
}

static void InitConnectData(net_connect_data_t *connect_data)
{
boolean shorttics;

connect_data->max_players = MAXPLAYERS;
connect_data->drone = false;

Expand Down Expand Up @@ -199,10 +202,19 @@ static void InitConnectData(net_connect_data_t *connect_data)
connect_data->gamemode = gamemode;
connect_data->gamemission = gamemission;

//!
// @category demo
//
// Play with low turning resolution to emulate demo recording.
//

shorttics = M_ParmExists("-shorttics");

// Are we recording a demo? Possibly set lowres turn mode

connect_data->lowres_turn = M_CheckParm("-record") > 0
&& M_CheckParm("-longtics") == 0;
connect_data->lowres_turn = (M_ParmExists("-record")
&& !M_ParmExists("-longtics"))
|| shorttics;

// Read checksums of our WAD directory and dehacked information

Expand Down
2 changes: 1 addition & 1 deletion src/net_dedicated.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static char *not_dedicated_options[] =
"-deh", "-iwad", "-cdrom", "-gameversion", "-nomonsters", "-respawn",
"-fast", "-altdeath", "-deathmatch", "-turbo", "-merge", "-af", "-as",
"-aa", "-file", "-wart", "-skill", "-episode", "-timer", "-avg", "-warp",
"-loadgame", "-longtics", "-extratics", "-dup", NULL,
"-loadgame", "-longtics", "-extratics", "-dup", "-shorttics", NULL,
};

static void CheckForClientOptions(void)
Expand Down

0 comments on commit b53e7c1

Please sign in to comment.