public static void serverCmdTogglePathCamera(GameConnection client, bool val) { string control = val ? client["PathCamera"] : client["camera"]; client.setControlObject(control); syncEditorGui(); }
public static void serverCmddismountVehicle(GameConnection client) { Player player = client["player"]; Vehicle car = player.getControlObject(); Player passenger = car.getMountNodeObject(0); ((PlayerData)passenger.getDataBlock()).doDismount(passenger); client.setControlObject(player); }
public static void serverCmdToggleCamera(GameConnection client) { string control; if (client.getControlObject() == client["player"]) { ((Extendable.Camera) client["camera"]).setVelocity(new Point3F("0 0 0")); control = client["camera"]; } else { ((Player) client["player"]).setVelocity(new Point3F("0 0 0")); control = client["player"]; } client.setControlObject(control); syncEditorGui(); }
public static void serverCmdEditorCameraAutoFit(GameConnection client, float radius) { Extendable.Camera camera = client["camera"]; camera.autoFitRadius(radius); client.setControlObject(camera); syncEditorGui(); }
public static void serverCmdSetEditorFlyCamera(GameConnection client) { Extendable.Camera camera = client["camera"]; camera.setFlyMode(); client.setControlObject(camera); syncEditorGui(); }
public static void serverCmdSetEditorCameraNewtonDamped(GameConnection client) { Extendable.Camera camera = client["camera"]; camera.setFlyMode(); camera["newtonMode"] = true.AsString(); camera["newtonRotation"] = true.AsString(); camera.setAngularVelocity(new Point3F("0 0 0")); client.setControlObject(camera); syncEditorGui(); }
public static void serverCmdSetEditorCameraStandard(GameConnection client) { Extendable.Camera camera = client["camera"]; camera.setFlyMode(); camera["newtonMode"] = false.AsString(); camera["newtonRotation"] = false.AsString(); client.setControlObject(camera); syncEditorGui(); }
public static void serverCmdCycleCameraFlyType(GameConnection client) { Extendable.Camera camera = client["camera"]; if (camera.getMode() != TypeCameraMotionMode.Fly) return; if (camera["newtonMode"].AsBool() == false) { camera["newtonMode"] = true.AsString(); camera["newtonRotation"] = false.AsString(); camera.setVelocity(new Point3F("0 0 0")); } else if (camera["newtonRotation"].AsBool() == false) { camera["newtonMode"] = true.AsString(); camera["newtonRotation"] = true.AsString(); camera.setAngularVelocity(new Point3F("0 0 0")); } else { camera["newtonMode"] = false.AsString(); camera["newtonRotation"] = false.AsString(); } client.setControlObject(camera); syncEditorGui(); }
public static void serverCmdSetEditorCameraPlayer(GameConnection client) { ((Player) client["player"]).setVelocity(new Point3F("0 0 0")); client.setControlObject(client["player"]); client.setFirstPerson(true); omni.bGlobal["$isFirstPersonVar"] = true; syncEditorGui(); }
public static void serverCmddismountVehicle(GameConnection client) { Player player = client["player"]; Vehicle car = player.getControlObject(); Player passenger = car.getMountNodeObject(0); ((PlayerData) passenger.getDataBlock()).doDismount(passenger); client.setControlObject(player); }
public static void serverCmdsetPlayerControl(GameConnection client) { Player player = client["player"]; client.setControlObject(player); }
public static void serverCmdsetPlayerControl(GameConnection client) { Player player = client["player"]; client.setControlObject(player); }
public static void serverCmdDropCameraAtPlayer(GameConnection client) { Player player = client["player"]; ((Extendable.Camera) client["camera"]).setTransform(player.getEyeTransform()); ((Extendable.Camera) client["camera"]).setVelocity(new Point3F("0 0 0")); client.setControlObject(client["camera"]); syncEditorGui(); }
public static void serverCmdDropPlayerAtCamera(GameConnection client) { // If the player is mounted to something (like a vehicle) drop that at the // camera instead. The player will remain mounted. Player player = client["player"]; ShapeBase obj = null; obj = player.getObjectMount(); if (!omni.console.isObject(obj)) obj = client["player"]; obj.setTransform(((Extendable.Camera) client["Camera"]).getTransform()); obj.setVelocity(new Point3F("0 0 0")); client.setControlObject(player); syncEditorGui(); }