From: Samual Date: Sun, 23 Oct 2011 23:47:07 +0000 (-0400) Subject: Also allow the client to do the same thing server does with sv_autoscreenshot X-Git-Tag: xonotic-v0.6.0~40^2~20^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5dc034c072658c5a6e6199d7fb59f4dddfc5a4fc;p=xonotic%2Fxonotic-data.pk3dir.git Also allow the client to do the same thing server does with sv_autoscreenshot --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 467e98b06..b37147aee 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1754,6 +1754,8 @@ set cl_handicap 1 "the higher, the more damage you will receive (client setting) seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice." +seta cl_autoscreenshot 0 "client option to automatically take a screenshot once the map has ended (see also sv_autoscreenshot)" + // must be at the bottom of this file: // alias for switching the teamselect menu alias menu_showteamselect "menu_cmd directmenu TeamSelect" diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 6c37ac92d..5e5c8c7ba 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -315,6 +315,7 @@ float default_weapon_alpha; .float cvar_cl_handicap; .float cvar_cl_playerdetailreduction; .float cvar_cl_clippedspectating; +.float cvar_cl_autoscreenshot; .float cvar_cl_movement_track_canjump; .float cvar_cl_newusekeysupported; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 5560c0b73..6d60fd8c0 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1345,9 +1345,8 @@ void IntermissionThink() { FixIntermissionClient(self); - if(autocvar_sv_autoscreenshot) - if(self.autoscreenshot > 0) - if(time > self.autoscreenshot) + if( (autocvar_sv_autoscreenshot || self.cvar_cl_autoscreenshot) + && ((self.autoscreenshot > 0) && (time > self.autoscreenshot)) ) { self.autoscreenshot = -1; if(clienttype(self) == CLIENTTYPE_REAL) diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 27c04f8a4..7e6759228 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -583,6 +583,7 @@ void GetCvars(float f) get_cvars_s = s; MUTATOR_CALLHOOK(GetCvars); GetCvars_handleFloat(s, f, autoswitch, "cl_autoswitch"); + GetCvars_handleFloat(s, f, cvar_cl_autoscreenshot, "cl_autoscreenshot"); GetCvars_handleFloat(s, f, cvar_cl_playerdetailreduction, "cl_playerdetailreduction"); GetCvars_handleString(s, f, cvar_g_xonoticversion, "g_xonoticversion"); GetCvars_handleFloat(s, f, cvar_cl_handicap, "cl_handicap");