From f41430c5ae5222e8664b31346fd5b30333d1dc9d Mon Sep 17 00:00:00 2001 From: VegaZ Date: Sat, 13 Feb 2021 18:07:26 +0100 Subject: [PATCH] Finish Medic-extension; Clean up Code, remove DEBUG --- .../Interaction/factioninteraction.ts | 12 +++--------- ReallifeGamemode.Server/Factions/Medic/Medic.cs | 2 -- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ReallifeGamemode.Client/Interaction/factioninteraction.ts b/ReallifeGamemode.Client/Interaction/factioninteraction.ts index 641d1487..b08d22a1 100644 --- a/ReallifeGamemode.Client/Interaction/factioninteraction.ts +++ b/ReallifeGamemode.Client/Interaction/factioninteraction.ts @@ -27,10 +27,8 @@ export default function factionInteraction(globalData: IGlobalData) { var rangeLeft; var sortText; var deadRespawned = false; - var isRevived = false; var timeLeft = 0; var deathTime; - var taskTimeout = false; var ticketName: string; var pointsName: string; @@ -478,7 +476,6 @@ export default function factionInteraction(globalData: IGlobalData) { } mp.events.add("cutMedicEarnings", () => { - mp.gui.chat.push("DEBUG: Nur noch hälfte Verdienst!") deadRespawned = true; }); @@ -491,15 +488,11 @@ export default function factionInteraction(globalData: IGlobalData) { mp.events.add('playerEnterCheckpoint', (activeCheckpoint) => { if (deadRespawned == true) { - mp.gui.chat.push("DEBUG: Checkpoint NACH wiederbelebung des Spielers betreten") - mp.gui.chat.push("DEBUG: Hälfte ausgezahlt") activeCheckpoint.destroy(); mp.events.callRemote("PayCutMedicEarnings"); activeTask = false; deadRespawned = false; timeLeft = 0; - } else { - mp.gui.chat.push("DEBUG: Checkpoint VOR wiederbelebung des Spielers betreten") } }); @@ -534,7 +527,8 @@ export default function factionInteraction(globalData: IGlobalData) { timeLeft = Math.round(Math.abs(Math.floor(currentDate.getTime() / 1000) - deathTime - 60)); if (timeLeft < 1) mp.events.call("destroyMedicTaskCheckpoint"); } - + + /*DEBUG TIMER für die Zeit die man noch hat zur Wiederbelebung if (deadRespawned == false) { mp.game.graphics.drawText(timeLeft.toString() + "s ", [0.5, 0.88], { font: 7, @@ -553,7 +547,7 @@ export default function factionInteraction(globalData: IGlobalData) { centre: true }); } - } + } */ } }); } \ No newline at end of file diff --git a/ReallifeGamemode.Server/Factions/Medic/Medic.cs b/ReallifeGamemode.Server/Factions/Medic/Medic.cs index c274581b..4cbff415 100644 --- a/ReallifeGamemode.Server/Factions/Medic/Medic.cs +++ b/ReallifeGamemode.Server/Factions/Medic/Medic.cs @@ -149,8 +149,6 @@ namespace ReallifeGamemode.Server.Factions.Medic MedicTask task = ReviveTasks.FirstOrDefault(t => t.Victim == player.Name); var medic = PlayerService.GetPlayerByNameOrId(task.MedicName); medic.TriggerEvent("cutMedicEarnings"); - medic.SendChatMessage("DEBUG: Der Spieler wurde respawnt. Nur noch 50% des Verdienst"); - NAPI.Chat.SendChatMessageToAll("DEBUG: Player:" + player.Name + " Medic:" + medic.Name); } [RemoteEvent("PayCutMedicEarnings")] public void PayCutMedicEarnings(Player player)