mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Replays: add netdemo_size cvar, add to Data Options
Controls size of replay buffer when recording
This commit is contained in:
parent
bf1e4cb5bc
commit
09b90c3cf1
4 changed files with 10 additions and 6 deletions
|
|
@ -537,6 +537,7 @@ consvar_t cv_maxping = Server("maxdelay", "20").values(CV_Unsigned);
|
|||
consvar_t cv_menujam = Server("menujam", "menu").values({{0, "menu"}, {1, "menu2"}, {2, "menu3"}});
|
||||
consvar_t cv_menujam_update = Server("menujam_update", "Off").on_off();
|
||||
consvar_t cv_netdemosyncquality = Server("netdemo_syncquality", "1").min_max(1, 35);
|
||||
consvar_t cv_netdemosize = Server("netdemo_size", "4").values(CV_Natural);
|
||||
|
||||
void NetTimeout_OnChange(void);
|
||||
consvar_t cv_nettimeout = Server("nettimeout", "210").min_max(TICRATE/7, 60*TICRATE).onchange(NetTimeout_OnChange);
|
||||
|
|
|
|||
|
|
@ -2088,16 +2088,13 @@ void G_WriteMetalTic(mobj_t *metal)
|
|||
//
|
||||
void G_RecordDemo(const char *name)
|
||||
{
|
||||
extern consvar_t cv_netdemosize;
|
||||
|
||||
INT32 maxsize;
|
||||
|
||||
strcpy(demoname, name);
|
||||
strcat(demoname, ".lmp");
|
||||
//@TODO make a maxdemosize cvar
|
||||
// NOPE. We are kicking this can HELLA down the road. -Tyron 2024-01-20
|
||||
maxsize = 1024*1024*4;
|
||||
|
||||
if (M_CheckParm("-maxdemo") && M_IsNextParm())
|
||||
maxsize = atoi(M_GetNextParm()) * 1024;
|
||||
maxsize = 1024 * 1024 * cv_netdemosize.value;
|
||||
|
||||
// if (demobuf.buffer)
|
||||
// Z_Free(demobuf.buffer);
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@ typedef enum
|
|||
dopt_replay,
|
||||
dopt_rprecord,
|
||||
dopt_rpsync,
|
||||
dopt_rpsize,
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
dopt_discord,
|
||||
dopt_drp,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include "../k_menu.h"
|
||||
#include "../discord.h" // discord rpc cvars
|
||||
|
||||
extern consvar_t cv_netdemosize;
|
||||
|
||||
// data options menu -- see dopt_e
|
||||
menuitem_t OPTIONS_Data[] =
|
||||
{
|
||||
|
|
@ -26,6 +28,9 @@ menuitem_t OPTIONS_Data[] =
|
|||
{IT_STRING | IT_CVAR, "Net Consistency Quality", "For filesize, how often do we write position data in online replays?",
|
||||
NULL, {.cvar = &cv_netdemosyncquality}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Buffer Size (MB)", "Lets replays last longer with more players. Uses more RAM.",
|
||||
NULL, {.cvar = &cv_netdemosize}, 0, 0},
|
||||
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
{IT_HEADER, "Discord Rich Presence...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue