]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added -benchmark commandline option
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 10 Mar 2004 06:17:56 +0000 (06:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 10 Mar 2004 06:17:56 +0000 (06:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3995 d7cf8633-e32d-0410-b094-e92efae38249

cl_demo.c
client.h
host.c
todo

index c6402413e5239946dc832227a7cfc798694d4c8e..1024cf3a9e1266f4027cc8e6eb1255d5af4171e6 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -338,6 +338,7 @@ void CL_PlayDemo_f (void)
 
        SCR_BeginLoadingPlaque ();
 
+       strlcpy(cls.demoname, name, sizeof(cls.demoname));
        cls.demoplayback = true;
        cls.state = ca_connected;
        cls.forcetrack = 0;
@@ -374,6 +375,9 @@ void CL_FinishTimeDemo (void)
        fpsmax = cls.td_minframetime > 0 ? 1.0 / cls.td_minframetime : 0;
        // LordHavoc: timedemo now prints out 7 digits of fraction, and min/avg/max
        Con_Printf("%i frames %5.7f seconds %5.7f fps\nmin/avg/max: %5.7f/%5.7f/%5.7f\n", frames, time, fpsavg, fpsmin, fpsavg, fpsmax);
+       Con_LogPrintf("benchmark.log", "date %s | enginedate %s | demo %s | commandline %s | result %i frames %5.7f seconds %5.7f fps min/avg/max: %5.7f/%5.7f/%5.7f\n", Sys_TimeString("%Y-%m-%d %H:%M:%S"), buildstring, cls.demoname, cmdline.string, frames, time, fpsavg, fpsmin, fpsavg, fpsmax);
+       if (COM_CheckParm("-benchmark"))
+               Host_Quit_f();
 }
 
 /*
index 2e8349e1c7626e56dc5f08aee8bdb49e146909c7..870e6129d6f15d66ca0823692587527ed963fde4 100644 (file)
--- a/client.h
+++ b/client.h
@@ -367,6 +367,8 @@ typedef struct
        int demonum;
        // list of demos in loop
        char demos[MAX_DEMOS][MAX_DEMONAME];
+       // the actively playing demo (set by CL_PlayDemo_f)
+       char demoname[64];
 
 // demo recording info must be here, because record is started before
 // entering a map (and clearing client_state_t)
diff --git a/host.c b/host.c
index e48efcc88ba68d7d203900d863cc2b3390921dc4..61c9bb0b05502c65d42cd7a612f1b2bb95805f90 100644 (file)
--- a/host.c
+++ b/host.c
@@ -864,6 +864,8 @@ Host_Init
 */
 void Host_Init (void)
 {
+       int i;
+
        // LordHavoc: quake never seeded the random number generator before... heh
        srand(time(NULL));
 
@@ -928,6 +930,12 @@ void Host_Init (void)
                Cbuf_InsertText("exec teu.rc\n");
        else
                Cbuf_InsertText("exec quake.rc\n");
+
+       // check for special benchmark mode
+       i = COM_CheckParm("-benchmark");
+       if (i && i + 1 < com_argc)
+               Cbuf_InsertText(va("timedemo %s\n", com_argv[i + 1]));
+
        Cbuf_Execute();
 }
 
diff --git a/todo b/todo
index b5b0b8fac86a6d88da3658d42d14a2b94d677b56..f6469eee55c25c7d6cb6de97fda29a28ad132089 100644 (file)
--- a/todo
+++ b/todo
@@ -1,6 +1,9 @@
 - todo: difficulty ratings are: 0 = trivial, 1 = easy, 2 = easy-moderate, 3 = moderate, 4 = moderate-hard, 5 = hard, 6 = hard++, 7 = nightmare, d = done, -n = done but have not notified the people who asked for it, f = failed
 -f darkplaces: fix view blends slightly lingering as time goes on, they should go away completely (Cruaich)
 -f darkplaces: model interpolation off crashes?  (SeienAbunae)
+-n darkplaces: "edict -1" and other invalid numbers cause an error, should just complain (Supajoe)
+-n darkplaces: GAME_FNIGGIUM: console doesn't show unless you manually pull it down (Sajt)
+-n darkplaces: add -benchmark commandline option which plays a demo, appends the resulting min/max/avg fps to gamedir/benchmark.log with commandline so people know what settings were used, like +exec realtimelow.cfg, +exec realtimemed.cfg, etc (romi)
 -n darkplaces: add PF_copyentity error checking for copying to world (yummyluv)
 -n darkplaces: add a "edictset" command to console to set a single field of an edict to the specified value
 -n darkplaces: add a config saving command (Speeds)
 -n darkplaces: upgrade network protocol to send precise angles, and make EF_LOWPRECISION downgrade both origin and angles (Urre, -Wazat for Battlemech, FrikaC, mashakos, RenegadeC, Sajt)
 -n darkplaces: write a readme (Antti)
 -n dpmod: make grapple off-hand (joe hill)
--n darkplaces: "edict -1" and other invalid numbers cause an error, should just complain (Supajoe)
--n darkplaces: GAME_FNIGGIUM: console doesn't show unless you manually pull it down (Sajt)
-d darkplaces: adaptive patch subdivision levels on X and Y based on r_subdivisions cvar
-d darkplaces: add "skin" and "pflags" parsing to light entity loader in rtlights mode (Electro)  
-0 darkplaces: add -benchmark commandline option which plays a demo, appends the resulting min/max/avg fps to gamedir/benchmark.log with commandline so people know what settings were used, like +exec realtimelow.cfg, +exec realtimemed.cfg, etc (romi)
 0 darkplaces: add DP_EF_NOSHADOW extension (Urre)
 0 darkplaces: add DP_GFX_QUAKE3MODELTAGS, DP_GFX_SKINFILES, and any other new extensions to the wiki
 0 darkplaces: add DP_SV_ROTATINGBMODEL extension to explain that MOVETYPE_PUSH/SOLID_BSP support rotation in darkplaces and a demonstration of how to use it without qc modifications (Uffe, Supajoe)
@@ -113,6 +111,7 @@ d darkplaces: add "skin" and "pflags" parsing to light entity loader in rtlights
 0 darkplaces: fix loadsky;r_restart;r_restart crash, again (sajt)
 0 darkplaces: fix model lighting with r_shadow_realtime_world_lightmaps mode, it seems to be adding dlights to vertices? (Mitchell)
 0 darkplaces: fix q3bsp fogging (Sajt)
+0 darkplaces: fix q3bsp static shadow volumes (currently they are calculated as if novis)
 0 darkplaces: fix r_editlights_edit origin not working (romi)
 0 darkplaces: fix the bug causing models in an unlit map to be black when they should be fullbright (Sajt)
 0 darkplaces: fix the mouse move when console is raised, probably by ignoring the first move after console raise (mashakos)
@@ -210,6 +209,7 @@ d darkplaces: add "skin" and "pflags" parsing to light entity loader in rtlights
 0 litsupport: fix the one COM_HunkFile call that uses two parameters (glquake took one) and fix the few "//lit support begin" messages at the end of code blocks (metlslime)
 0 revelation: change the wabbit kill message to " was hunting wabbit but shot " " instead"
 0 sv_user.qc: figure out why looking up/down slows movement and fix it (Vermeulen)
+1 darkplaces: add "sendcvar <cvarname>" command which executes on clients and forwards a "sentcvar <cvarname> <cvarvalue>" to the server, which the qc can catch (Urre)
 1 darkplaces: add DP_CLIENTCAMERA extension (.entity clientcamera; sets which entity the client views from) (Wazat for Battlemech, SeienAbunae)
 1 darkplaces: add DP_EF_CLIENTLOCKANGLES extension (prevents client from turning view, takes angles from entity) (Wazat for Battlemech, SeienAbunae)
 1 darkplaces: add DP_QC_ENDFRAME extension/documentation and post it on wiki (tell Uffe, SeienAbunae)
@@ -392,6 +392,10 @@ d darkplaces: GAME_FNIGGIUM: minimum resolution: 640x480
 d darkplaces: PF_traceline/PF_tracebox now work with world as the edict
 d darkplaces: Quake3 bsp support (Vermeulen, Mitchell, SeienAbunae)
 d darkplaces: TEXF_CLAMP needs to use GL_CLAMP_TO_EDGE (if not supported just use REPEAT as a fallback, not aware of any cards that lack this)
+d darkplaces: adaptive patch subdivision levels on X and Y based on r_subdivisions cvar
+d darkplaces: add "showdate" cvar
+d darkplaces: add "showtime" cvar
+d darkplaces: add "skin" and "pflags" parsing to light entity loader in rtlights mode (Electro)  
 d darkplaces: add 66.28.32.64 to master server list (Willis)
 d darkplaces: add DP_GFX_EXTERNALTEXTURES extension (Electro)
 d darkplaces: add DP_LITSUPPORT extension and document it