public static void SetSpeed(int speed) { GliderSettings defaultSettings = GliderSettings.Get(); settings.FlyUpMaxSpeed = defaultSettings.FlyUpMaxSpeed * speed; settings.FlyUpPower = defaultSettings.FlyUpPower * speed; settings.FlyForwardPowerMaxSpeed = defaultSettings.FlyForwardPowerMaxSpeed * speed; settings.FlyForwardPowerMax = defaultSettings.FlyForwardPowerMax * speed; settings.DragMaxSpeed = defaultSettings.DragMaxSpeed * speed; }
private static void Initialize() { settings = GliderSettings.Get(); settings.MeshPath = "/meshes/fast_glider.ply"; settings.MeshTypeKey = "fastglider"; settings.ItemTypeName = "fastglider"; SetSpeed(2); string str = MODPATH + settings.MeshPath; ServerManager.FileTable.StartLoading(str, ECachedFileType.Mesh); FastGlider.FastGliderType = MeshedObjectType.Register(new MeshedObjectTypeSettings(settings.MeshTypeKey, str, settings.TextureMapping) { colliders = settings.BoxColliders.Select <TransportManager.Box, RotatedBounds>((Func <TransportManager.Box, RotatedBounds>)(box => box.ToRotatedBounds)).ToList <RotatedBounds>(), InterpolationLooseness = 1.5f, sendUpdateRadius = 500 }); }