First actual functionality. 'cmd g_sandbox spawn' will spawn a model in front of...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 24 Oct 2011 13:06:36 +0000 (16:06 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 24 Oct 2011 13:06:36 +0000 (16:06 +0300)
qcsrc/server/mutators/sandbox.qc

index f9e4e633b3fad4ea067b6aae3c6e9e015b0ced15..0e20901ace6e96260429600c9a3d4e7de8887cc1 100644 (file)
@@ -15,6 +15,19 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                        print_to(self, "You can use the following sandbox commands:");
                        return 1;
                }
+               else if(argv(1) == "spawn")
+               {
+                       // spawn a new object with the default settings
+
+                       entity e;
+                       e = spawn();
+                       makevectors(self.v_angle);
+                       traceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 250, MOVE_NOMONSTERS, self);
+                       setorigin(e, trace_endpos);
+                       setmodel(e, "models/vehicles-static/raptor.md3");
+
+                       return 1;
+               }
        }
        return 0;
 }