From d6e9cce791889142eb8bef00ea4e80154f71fc56 Mon Sep 17 00:00:00 2001 From: nahkampfaffe Date: Tue, 3 Sep 2019 01:18:48 +0200 Subject: [PATCH] Delete CheckpointBusfahrer.cs due to errors --- .../Jobs/BusDriver/CheckpointBusfahrer.cs | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 ReallifeGamemode.Client/Jobs/BusDriver/CheckpointBusfahrer.cs diff --git a/ReallifeGamemode.Client/Jobs/BusDriver/CheckpointBusfahrer.cs b/ReallifeGamemode.Client/Jobs/BusDriver/CheckpointBusfahrer.cs deleted file mode 100644 index 289463c9..00000000 --- a/ReallifeGamemode.Client/Jobs/BusDriver/CheckpointBusfahrer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using RAGE; -using RAGE.Elements; - -namespace ReallifeGamemode.Client.Jobs.BusDriver -{ - public static class CheckpointHelper - { - public static List Checkpoints = new List(); - - public static void ClearAllCheckpoints() - { - while (Checkpoints.Count != 0) - { - Checkpoints[Checkpoints.Count - 1].Delete(); - Checkpoints.Remove(Checkpoints[Checkpoints.Count - 1]); - } - } - - public static void ClearCheckpoint(CheckpointInstance checkpointInstance) - { - checkpointInstance.Delete(); - } - - public static CheckpointInstance IsNearCheckpoint(float distance) - { - return Checkpoints.Find(checkpoint => checkpoint.Checkpoint.Position.DistanceTo2D(Player.LocalPlayer.Position) <= distance); - } - } - - public class CheckpointInstance - { - public Checkpoint Checkpoint { get; set; } = null; - public bool RecentlyPlaced = true; - public float Size = 5f; - - public CheckpointInstance(Vector3 position, float size) - { - Checkpoint = new Checkpoint(1, position.Subtract(new Vector3(0, 0, 1)), size, new Vector3(), new RGBA(255, 255, 255, 155), true, 0); - Size = size; - CheckpointHelper.Checkpoints.Add(this); - } - - public void Delete() - { - Checkpoint.Destroy(); - CheckpointHelper.Checkpoints.Remove(this); - RAGE.Game.Audio.PlaySoundFrontend(1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true); - } - } -}