From: Rudolf Polzer Date: Fri, 20 Jan 2012 16:17:11 +0000 (+0100) Subject: g_max_info_autoscreenshot X-Git-Tag: xonotic-v0.6.0~104^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=58eb471d26174f7d18d8ea0777378fb16ce17db2;p=xonotic%2Fxonotic-data.pk3dir.git g_max_info_autoscreenshot --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index b7ac69620..5c142926a 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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 diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index bdf262cfe..bf361d088 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -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; diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index e7154b7f5..b37581cee 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -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)