From 0639b3d51749b4de38e769e11f182e8291c362ab Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 21 Sep 2020 16:26:50 +0200 Subject: [PATCH] =?UTF-8?q?revive=20auftr=C3=A4ge=20werden=20nun=20gel?= =?UTF-8?q?=C3=B6scht=20wenn=20spieler=20wieder=20legt=20oder=20beim=20dis?= =?UTF-8?q?connect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Events/Death.cs | 2 ++ ReallifeGamemode.Server/Events/Disconnect.cs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index a2279adc..ca45a809 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -231,6 +231,8 @@ namespace ReallifeGamemode.Server.Events dbContext.SaveChanges(); } player.RemoveAllWeapons(); + MedicTask task = Medic.ReviveTasks.FirstOrDefault(t => t.Victim == player.Name); + Medic.RemoveTaskFromList(task); NAPI.Player.SpawnPlayer(player, new Vector3(-495.45, -336.33, 34.5), -98.36f); } diff --git a/ReallifeGamemode.Server/Events/Disconnect.cs b/ReallifeGamemode.Server/Events/Disconnect.cs index b281887e..a26129b6 100644 --- a/ReallifeGamemode.Server/Events/Disconnect.cs +++ b/ReallifeGamemode.Server/Events/Disconnect.cs @@ -14,6 +14,7 @@ using ReallifeGamemode.Services; using ReallifeGamemode.Server.Services; using ReallifeGamemode.Server.Types; using ReallifeGamemode.Server.Report; +using ReallifeGamemode.Server.Factions.Medic; /** * @overview Life of German Reallife - Event Login (Login.cs) @@ -136,6 +137,8 @@ namespace ReallifeGamemode.Server.Events player.TriggerEvent("CLIENT:DestroyPed", 2); player.TriggerEvent("CLIENT:DestroyPed", 3); player.TriggerEvent("CLIENT:DestroyPed", 4); + MedicTask task = Medic.ReviveTasks.FirstOrDefault(t => t.Victim == player.Name); + Medic.RemoveTaskFromList(task); } } }