From 5bce19a3fdf2b2943c7c53364d074fe4a52c917e Mon Sep 17 00:00:00 2001 From: flowtron Date: Sat, 2 Apr 2011 15:41:52 +0000 Subject: [PATCH] getEngineState COMMAND && DOC git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6197 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- docs/reference.xml | 34 ++++++++++++++++++++++++++-------- source/src/renderhud.cpp | 5 +++++ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/docs/reference.xml b/docs/reference.xml index 6cc05fdc..3c4fbcf3 100644 --- a/docs/reference.xml +++ b/docs/reference.xml @@ -90,18 +90,17 @@ - Temporarily redefines the value of an alias. + Temporarily redefines the value of an alias. - - - - Output: 2 - - - + + + + Output: 2 + + @@ -1021,6 +1020,25 @@ + + Returns a list of values describing the current engine (rendering) state. + + It will only be filled after the first frame was drawn. + The list is: FPS LOD WQD WVT EVT + FPS = Frames Per Second + LOD = Level Of Detail + WQD = World QuaD Count + WVT = World VerTex Count + EVT = Extra VerTex Count (HUD & menu) + + + + + + + + Enables output of processed network packets. diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index adf9e847..4ac44e19 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -692,6 +692,10 @@ void drawscores() glPopAttrib(); } +string enginestateinfo = ""; +void CSgetEngineState() { result(enginestateinfo); } +COMMANDN(getEngineState, CSgetEngineState, ARG_NONE); + VARP(clockdisplay,0,0,2); VARP(dbgpos,0,0,1); void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwater) @@ -781,6 +785,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat extern void r_accuracy(); if (!is_spect) r_accuracy(); if(!hideconsole) renderconsole(); + formatstring(enginestateinfo)("%d %d %d %d %d", curfps, lod_factor(), nquads, curvert, xtraverts); if(showstats) { if(showstats==2)