set g_sandbox 0 "allow players to spawn and edit objects around the map"
set g_sandbox_info 1 "print non-critical information to the server"
+set g_sandbox_editor_distance 150 "distance by which objects spawn in front of the player"
set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
float autocvar_g_debug_defaultsounds;
float autocvar_g_loituma;
float autocvar_g_sandbox_info;
+float autocvar_g_sandbox_editor_distance;
entity e;
e = spawn();
+ e.classname = "object";
makevectors(self.v_angle);
- traceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 250, MOVE_NOMONSTERS, self);
+ traceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * autocvar_g_sandbox_editor_distance, 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