]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Print information about spawned objects to the server by default. Also add informatio...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 24 Oct 2011 13:21:19 +0000 (16:21 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 24 Oct 2011 13:21:19 +0000 (16:21 +0300)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/mutators/sandbox.qc

index 68ca0eab98152fe896558ab503951f76f6d386a9..079a409a3ff81eef6918844d822f6e4ee275fea3 100644 (file)
@@ -542,6 +542,7 @@ set g_player_brightness 0   "set to 2 for brighter players"
 seta g_balance_cloaked_alpha 0.25
 
 set g_sandbox 0 "allow players to spawn and edit objects around the map"
+set g_sandbox_info 1 "print non-critical information to the server"
 
 set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
 set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
index 0187f44e60cc26f3c4d05b2e1d20f10339d8d448..46378fe57a9515ea6b59720b044772053d2ad35e 100644 (file)
@@ -1199,3 +1199,4 @@ float autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
 float autocvar_g_trueaim_minrange;
 float autocvar_g_debug_defaultsounds;
 float autocvar_g_loituma;
+float autocvar_g_sandbox_info;
index 0e20901ace6e96260429600c9a3d4e7de8887cc1..0e8303e1e197bed1cc5f03aff1e46412c38b899b 100644 (file)
@@ -13,6 +13,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                if(argv(1) == "help")
                {
                        print_to(self, "You can use the following sandbox commands:");
+                       print_to(self, "^7\"^2spawn ^3models/foo/bar.md3^7\" spawns a new object in front of the player, and gives it the specified model");
                        return 1;
                }
                else if(argv(1) == "spawn")
@@ -26,6 +27,9 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                        setorigin(e, trace_endpos);
                        setmodel(e, "models/vehicles-static/raptor.md3");
 
+                       if(autocvar_g_sandbox_info)
+                               print(strcat(self.netname, " spawned an object at origin ", vtos(e.origin), "\n"));
+
                        return 1;
                }
        }