From: Mircea Kitsune Date: Mon, 24 Oct 2011 13:06:36 +0000 (+0300) Subject: First actual functionality. 'cmd g_sandbox spawn' will spawn a model in front of... X-Git-Tag: xonotic-v0.6.0~35^2~18^2~218 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=825b472d88a8762141caf83601191b55e7a11f75 First actual functionality. 'cmd g_sandbox spawn' will spawn a model in front of the player. Currently uses a fixed model for testing purposes. --- diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index f9e4e633b3..0e20901ace 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -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; }