New Release

- Dodano więcej modeli do mocy Impostor.
- Zmieniono sposób rejestrowania mocy.
- Zmieniono wiadomości informacyjne o mocy zabójcy oraz sojusznikach.
- Naprawiono crash serwera przy fall damage
This commit is contained in:
D3X 2024-09-23 12:52:05 +02:00
parent 810ca2fa3c
commit 68f26a22f4
30 changed files with 253 additions and 108 deletions

View file

@ -12,6 +12,8 @@ namespace dRandomSkills
public static void LoadPilot()
{
Utils.RegisterSkill("Pilot", "Latanie na noclip przez dany czas", "#1466F5");
Instance.RegisterEventHandler<EventRoundFreezeEnd>((@event, info) =>
{
Instance.AddTimer(0.1f, () =>
@ -38,9 +40,14 @@ namespace dRandomSkills
Instance.RegisterEventHandler<EventPlayerDeath>((@event, info) =>
{
var player = @event.Userid;
if (PlayerPilotInfo.ContainsKey(player.SteamID))
var playerInfo = Instance.skillPlayer.FirstOrDefault(p => p.SteamID == player.SteamID);
if (playerInfo?.Skill == "Pilot")
{
PlayerPilotInfo.Remove(player.SteamID);
if (PlayerPilotInfo.ContainsKey(player.SteamID))
{
PlayerPilotInfo.Remove(player.SteamID);
}
}
return HookResult.Continue;