Give the player's angles to the object, as he spawns it from behind
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 24 Oct 2011 13:27:21 +0000 (16:27 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 24 Oct 2011 13:27:21 +0000 (16:27 +0300)
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"));