From bb52078b2dc2280ee46ae08305c5206daa53e381 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Fri, 28 Oct 2011 01:00:26 +0300 Subject: [PATCH] Remove code for spawning items. I didn't like its implementation, it would only work for weapons, and the focus of the sandbox is currently on objects --- qcsrc/server/mutators/sandbox.qc | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 2535c7f24..06edcaf20 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -202,7 +202,6 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) // ---------------- COMMAND: HELP ---------------- case "help": print_to(self, "You can use the following sandbox commands:"); - print_to(self, "^7\"^2item_spawn ^3item^7\" spawns the specified item in front of the player. Only weapons are currently supported"); print_to(self, "^7\"^2object_spawn ^3models/foo/bar.md3^7\" spawns a new object in front of the player, and gives it the specified model"); print_to(self, "^7\"^2object_remove^7\" removes the object the player is looking at. Players can only remove their own objects"); print_to(self, "^7\"^2object_duplicate ^3value^7\" duplicates the object. 'copy' copies the object, 'paste' puts it in front of the player"); @@ -226,35 +225,6 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) print_to(self, "^7The ^1drag object ^7key can be used to grab and carry objects. Players can only grab their own objects"); return TRUE; - // ---------------- COMMAND: SPAWN ITEM ---------------- - case "item_spawn": - // only weapons are currently supported - - if(cmd_argc < 3) - { - print_to(self, "^1SANDBOX - WARNING: ^7Attempted to spawn an item without specifying its type. Please specify the name of your item after the 'item_spawn' command"); - return TRUE; - } - - // spawn a new item - makevectors(self.v_angle); - WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * autocvar_g_sandbox_editor_distance_spawn, MOVE_NOMONSTERS, self); - - for(i = WEP_FIRST; i <= WEP_LAST; ++i) - { - e = get_weaponinfo(i); - if(e.netname == argv(2)) - { - W_ThrowNewWeapon(self, i, FALSE, trace_endpos, '0 0 0'); - if(autocvar_g_sandbox_info > 0) - print("^3SANDBOX - SERVER: ^7", strcat(self.netname, " spawned a ^2", e.netname, "^7 at origin ^3", vtos(e.origin), "\n")); - return TRUE; - } - } - - print_to(self, "^1SANDBOX - WARNING: ^7Attempted to spawn an invalid or unsupported item. See 'sandbox help' for allowed items"); - return TRUE; - // ---------------- COMMAND: SPAWN OBJECT ---------------- case "object_spawn": if(object_count >= autocvar_g_sandbox_editor_maxobjects) -- 2.39.2