]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
patch from esteel which swaps the address and player number in the
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 8 Apr 2008 06:18:33 +0000 (06:18 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 8 Apr 2008 06:18:33 +0000 (06:18 +0000)
naming of sv_autodemo_perclient demos, so that player number comes first

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8246 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index ed61256dc3aa5a3253b212d916ca8e9c34572533..853d57d9ebd055bcee60610517ea8f0d7ad332f6 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -150,7 +150,7 @@ cvar_t nehx19 = {0, "nehx19", "0", "nehahra data storage cvar (used in singlepla
 cvar_t cutscene = {0, "cutscene", "1", "enables cutscenes in nehahra, can be used by other mods"};
 
 cvar_t sv_autodemo_perclient = {CVAR_SAVE, "sv_autodemo_perclient", "0", "set to 1 to enable autorecorded per-client demos (they'll start to record at the beginning of a match); set it to 2 to also record client->server packets (for debugging)"};
-cvar_t sv_autodemo_perclient_nameformat = {CVAR_SAVE, "sv_autodemo_perclient_nameformat", "sv_autodemos/%Y-%m-%d_%H-%M", "The format of the sv_autodemo_perclient filename, followed by the map name, the IP address + port number, and the client number, separated by underscores" };
+cvar_t sv_autodemo_perclient_nameformat = {CVAR_SAVE, "sv_autodemo_perclient_nameformat", "sv_autodemos/%Y-%m-%d_%H-%M", "The format of the sv_autodemo_perclient filename, followed by the map name, the client number and the IP address + port number, separated by underscores" };
 
 
 server_t sv;
@@ -833,7 +833,7 @@ void SV_SendServerinfo (client_t *client)
                for(i = 0; ipaddress[i]; ++i)
                        if(!isalnum(ipaddress[i]))
                                ipaddress[i] = '-';
-               dpsnprintf (demofile, sizeof(demofile), "%s_%s_%s_%d.dem", Sys_TimeString (sv_autodemo_perclient_nameformat.string), levelname, ipaddress, PRVM_NUM_FOR_EDICT(client->edict));
+               dpsnprintf (demofile, sizeof(demofile), "%s_%s_%d_%s.dem", Sys_TimeString (sv_autodemo_perclient_nameformat.string), levelname, PRVM_NUM_FOR_EDICT(client->edict), ipaddress);
 
                SV_StartDemoRecording(client, demofile, -1);
        }