예제 #1
0
        public static void serverCmdTogglePathCamera(GameConnection client, bool val)
        {
            string control = val ? client["PathCamera"] : client["camera"];

            client.setControlObject(control);

            syncEditorGui();
        }
예제 #2
0
        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);
        }
예제 #3
0
        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();
        }
예제 #4
0
 public static void serverCmdEditorCameraAutoFit(GameConnection client, float radius)
 {
     Extendable.Camera camera = client["camera"];
     camera.autoFitRadius(radius);
     client.setControlObject(camera);
     syncEditorGui();
 }
예제 #5
0
 public static void serverCmdSetEditorFlyCamera(GameConnection client)
 {
     Extendable.Camera camera = client["camera"];
     camera.setFlyMode();
     client.setControlObject(camera);
     syncEditorGui();
 }
예제 #6
0
 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();
 }
예제 #7
0
 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();
 }
예제 #8
0
 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();
 }
예제 #9
0
 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);
 }
예제 #12
0
        public static void serverCmdsetPlayerControl(GameConnection client)
        {
            Player player = client["player"];

            client.setControlObject(player);
        }
예제 #13
0
 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();
 }
예제 #14
0
        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();
        }