Exemplo n.º 1
0
 public void toggleFirstPerson(bool val)
 {
     if (val)
     {
         coGameConnection ServerConnection = "ServerConnection";
         ServerConnection.setFirstPerson(ServerConnection.isFirstPerson());
         //((coGameConnection) "ServerConnection").setFirstPerson(!((coGameConnection) "ServerConnection").isFirstPerson());
     }
 }
Exemplo n.º 2
0
        public void ArmorOnMount(coPlayerData datablock, coPlayer player, coVehicle vehicle, int node)
        {
            coVehicleData vehicleDataBlock = vehicle.getDataBlock();

            if (node == 0)
            {
                player.setTransform(new TransformF("0 0 0 0 0 1 0"));


                string mountPose = vehicleDataBlock["mountPose[" + node + "]"];
                player.setActionThread(mountPose, true, true);

                player["lastWeapon"] = player.getMountedImage(WeaponSlot).AsString();


                coGameConnection client = player["client"];
                if (client.isObject())
                {
                    player["lastperson"] = client.isFirstPerson().AsString();
                }

                player.unmountImage(WeaponSlot);


                player.setControlObject(vehicle);

                if (player.getClassName() == "Player")
                {
                    console.commandToClient(player["client"], console.addTaggedString("toggleVehicleMap"), new[] { "true" });
                }
            }
            else
            {
                string pose = vehicleDataBlock["mountPose[" + node + "]"];
                player.setActionThread(pose != "" ? pose : "root", false, true);
            }
        }