]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/sandbox.qc
First actual functionality. 'cmd g_sandbox spawn' will spawn a model in front of...
[xonotic/xonotic-data.pk3dir.git] / 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;
 }