]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
g_max_info_autoscreenshot
authorRudolf Polzer <divverent@alientrap.org>
Fri, 20 Jan 2012 16:17:11 +0000 (17:17 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 20 Jan 2012 16:17:11 +0000 (17:17 +0100)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/cheats.qc

index b7ac696208372384f5830a20bc6e2a7639e30412..5c142926a2ba0263c507f5800ecb3df952476d8e 100644 (file)
@@ -1956,6 +1956,9 @@ set g_weapon_charge_colormod_blue_full -1
 set g_playerstats_uri ""
 set g_playerstats_debug 0 "when 1, player stats are dumped to the console too"
 
+// autoscreenshots
+set g_max_info_autoscreenshot 3 "how many info_autoscreenshot entities are allowed"
+
 // session locking
 locksession 1
 
index bdf262cfea962e35341e271fed5d58e96e2b9c3b..bf361d0886a3e791f184288ed28df1d162c144c2 100644 (file)
@@ -1216,3 +1216,4 @@ float autocvar_g_sandbox_object_scale_min;
 float autocvar_g_sandbox_object_scale_max;
 float autocvar_g_sandbox_object_material_velocity_min;
 float autocvar_g_sandbox_object_material_velocity_factor;
+float autocvar_g_max_info_autoscreenshot;
index e7154b7f52f17617b9a79c7560aba4e551f99161..b37581cee9228bc4798cf72dee356958181e5e7e 100644 (file)
@@ -92,9 +92,12 @@ float CheatsAllowed(float i, float argc, float fr) // the cheat gets passed as a
        if((++attempting, !CheatsAllowed(i,argc,fr))) \
                break
 
+float num_autoscreenshot;
 void spawnfunc_info_autoscreenshot()
 {
-       // empty spawnfunc just so this entity can exist
+       if(++num_autoscreenshot > autocvar_g_max_info_autoscreenshot)
+               objerror("Too many info_autoscreenshot entitites. FAIL!");
+       // this one just has to exist
 }
 
 float CheatImpulse(float i)