]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Merge branch 'master' into doombringer doombringer
authorCloudwalk <cloudwalk009@gmail.com>
Mon, 31 May 2021 19:37:15 +0000 (15:37 -0400)
committerCloudwalk <cloudwalk009@gmail.com>
Mon, 31 May 2021 19:37:15 +0000 (15:37 -0400)
23 files changed:
1  2 
.gitignore
cl_demo.c
cl_input.c
cl_parse.c
cl_screen.c
client.h
clvm_cmds.c
common.h
csprogs.c
fs.c
fs.h
makefile.inc
mvm_cmds.c
netconn.c
protocol.h
prvm_cmds.c
prvm_cmds.h
server.h
snd_main.c
sv_ccmds.c
sv_save.c
sv_user.c
svvm_cmds.c

diff --cc .gitignore
Simple merge
diff --cc cl_demo.c
Simple merge
diff --cc cl_input.c
Simple merge
diff --cc cl_parse.c
index 2703c677fbe83c673231d151666ae52444cea504,7e228eea772df580d9f4e8adf77802635a05b3f5..552a7821140200049357c3382758a5cc32129e9c
@@@ -1915,53 -1915,38 +1916,53 @@@ static void CL_ParseServerInfo (void
        // if cl_autodemo is set, automatically start recording a demo if one isn't being recorded already
                if (cl_autodemo.integer && cls.netcon && cls.protocol != PROTOCOL_QUAKEWORLD)
                {
 -                      char demofile[MAX_OSPATH];
 -
 +                      int record_autodemo = false;
 +                      
                        if (cls.demorecording)
                        {
 -                              // finish the previous level's demo file
 -                              CL_Stop_f(cmd_local);
 +                              if (cls.demorecording_isauto)
 +                              {
 +                                      // Reki 5-25-21: we only do this if it's an autodemo
 +                                      // finish the previous level's demo file
-                                       CL_Stop_f(cmd_client);
++                                      CL_Stop_f(cmd_local);
 +                                      record_autodemo = true;
 +                              }
 +                      }
 +                      else
 +                      {
 +                              record_autodemo = true;
                        }
 +                      
 +                      if (record_autodemo)
 +                      {
 +                              char demofile[MAX_OSPATH];
  
 -                      // start a new demo file
 -                      dpsnprintf (demofile, sizeof(demofile), "%s_%s.dem", Sys_TimeString (cl_autodemo_nameformat.string), cl.worldbasename);
 +                              // start a new demo file
 +                              dpsnprintf (demofile, sizeof(demofile), "%s_%s.dem", Sys_TimeString (cl_autodemo_nameformat.string), cl.worldbasename);
  
 -                      Con_Printf ("Auto-recording to %s.\n", demofile);
 +                              Con_Printf ("Auto-recording to %s.\n", demofile);
  
 -                      // Reset bit 0 for every new demo
 -                      Cvar_SetValueQuick(&cl_autodemo_delete,
 -                              (cl_autodemo_delete.integer & ~0x1)
 -                              |
 -                              ((cl_autodemo_delete.integer & 0x2) ? 0x1 : 0)
 -                      );
 +                              // Reset bit 0 for every new demo
 +                              Cvar_SetValueQuick(&cl_autodemo_delete,
 +                                      (cl_autodemo_delete.integer & ~0x1)
 +                                      |
 +                                      ((cl_autodemo_delete.integer & 0x2) ? 0x1 : 0)
 +                              );
  
 -                      cls.demofile = FS_OpenRealFile(demofile, "wb", false);
 -                      if (cls.demofile)
 -                      {
 -                              cls.forcetrack = -1;
 -                              FS_Printf (cls.demofile, "%i\n", cls.forcetrack);
 -                              cls.demorecording = true;
 -                              strlcpy(cls.demoname, demofile, sizeof(cls.demoname));
 -                              cls.demo_lastcsprogssize = -1;
 -                              cls.demo_lastcsprogscrc = -1;
 +                              cls.demofile = FS_OpenRealFile(demofile, "wb", false);
 +                              if (cls.demofile)
 +                              {
 +                                      cls.forcetrack = -1;
 +                                      FS_Printf (cls.demofile, "%i\n", cls.forcetrack);
 +                                      cls.demorecording = true;
 +                                      cls.demorecording_isauto = true;
 +                                      strlcpy(cls.demoname, demofile, sizeof(cls.demoname));
 +                                      cls.demo_lastcsprogssize = -1;
 +                                      cls.demo_lastcsprogscrc = -1;
 +                              }
 +                              else
 +                                      Con_Print(CON_ERROR "ERROR: couldn't open.\n");
                        }
 -                      else
 -                              Con_Print(CON_ERROR "ERROR: couldn't open.\n");
                }
        }
        cl.islocalgame = NetConn_IsLocalGame();
diff --cc cl_screen.c
Simple merge
diff --cc client.h
Simple merge
diff --cc clvm_cmds.c
Simple merge
diff --cc common.h
Simple merge
diff --cc csprogs.c
Simple merge
diff --cc fs.c
Simple merge
diff --cc fs.h
index a10ca1178eb84b49d8c4ab52e2fa0c5f560740fa,b8ada8b990b831b04c55441845e96958da262d59..9ea0945b4d3efa0e4922931ea351b30059f8692b
--- 1/fs.h
--- 2/fs.h
+++ b/fs.h
@@@ -85,7 -85,7 +85,8 @@@ void FS_Purge (qfile_t* file)
  const char *FS_FileWithoutPath (const char *in);
  const char *FS_FileExtension (const char *in);
  int FS_CheckNastyPath (const char *path, qbool isgamedir);
 +int FS_rmtree (const char *path);
+ void FS_SanitizePath (char *path);
  
  extern const char *const fs_checkgamedir_missing; // "(missing)"
  const char *FS_CheckGameDir(const char *gamedir); // returns NULL if nasty, fs_checkgamedir_missing (exact pointer) if missing
diff --cc makefile.inc
Simple merge
diff --cc mvm_cmds.c
Simple merge
diff --cc netconn.c
Simple merge
diff --cc protocol.h
Simple merge
diff --cc prvm_cmds.c
Simple merge
diff --cc prvm_cmds.h
Simple merge
diff --cc server.h
Simple merge
diff --cc snd_main.c
Simple merge
diff --cc sv_ccmds.c
Simple merge
diff --cc sv_save.c
Simple merge
diff --cc sv_user.c
Simple merge
diff --cc svvm_cmds.c
Simple merge