]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix autoscreenshot system - don't use an alias anymore, but instead use the already...
authorSamual <samual@xonotic.org>
Fri, 6 Jan 2012 23:34:04 +0000 (18:34 -0500)
committerSamual <samual@xonotic.org>
Fri, 6 Jan 2012 23:34:04 +0000 (18:34 -0500)
commands.cfg
defaultXonotic.cfg
qcsrc/server/g_world.qc

index 4edc2a85ff6ceb268b3cfc478b30a96e6393eee8..1f7e684588770a6e8554d6c9cc4162daabfe2899 100644 (file)
@@ -289,10 +289,4 @@ alias vdoend "vdo endmatch"
 //  rcon server commands
 // ======================
 rcon_secure 1
-set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\" movetoauto movetored movetoblue movetoyellow movetopink"
-
-// =============================
-//  other miscellaneous aliases
-// =============================
-alias autoscreenshot "screenshot screenshots/autoscreenshot/${1 !}-${2 !}.jpg; echo \"^5A screenshot has been taken at request of the server.\""
-
+set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\" movetoauto movetored movetoblue movetoyellow movetopink"
\ No newline at end of file
index d99e9bedeff3b46c6cf31f769e19a2b41a3848ca..7f85e4d04dee3fa75964114b5ceb2b4f3b322aeb 100644 (file)
@@ -1540,7 +1540,7 @@ 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)"
+seta cl_autoscreenshot 1 "Take a screenshot upon the end of a match... 0 = Disable completely, 1 = Allow sv_autoscreenshot to take a screenshot when requested, 2 = Always take an autoscreenshot anyway."
 
 // must be at the bottom of this file:
 // alias for switching the teamselect menu
index 24ffb68adbe63b4f786def7c878715b7131d3d1c..93cea80ffd078aaac431bb5a5dbf4b4bcd699178 100644 (file)
@@ -1302,12 +1302,15 @@ float mapvote_initialized;
 void IntermissionThink()
 {
        FixIntermissionClient(self);
-
-       if( (autocvar_sv_autoscreenshot || self.cvar_cl_autoscreenshot)
+       
+       float server_screenshot = (autocvar_sv_autoscreenshot && self.cvar_cl_autoscreenshot);
+       float client_screenshot = (self.cvar_cl_autoscreenshot == 2);
+       
+       if( (server_screenshot || client_screenshot)
                && ((self.autoscreenshot > 0) && (time > self.autoscreenshot)) )
        {
                self.autoscreenshot = -1;
-               if(clienttype(self) == CLIENTTYPE_REAL) { stuffcmd(self, sprintf("\nautoscreenshot \"%s\" \"%s\"\n", GetMapname(), strftime(FALSE, "%s"))); }
+               if(clienttype(self) == CLIENTTYPE_REAL) { stuffcmd(self, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; echo \"^5A screenshot has been taken at request of the server.\"", GetMapname(), strftime(FALSE, "%s"))); }
                return;
        }