]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/sandbox.qc
Give the player's angles to the object, as he spawns it from behind
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / sandbox.qc
index 0e8303e1e197bed1cc5f03aff1e46412c38b899b..d07b400bfc2020d605bd36e9066c393c5a53ca39 100644 (file)
@@ -26,6 +26,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                        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");
+                       e.angles = self.v_angle; // give the player's angles to the object, as he spawns it from behind
 
                        if(autocvar_g_sandbox_info)
                                print(strcat(self.netname, " spawned an object at origin ", vtos(e.origin), "\n"));