Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
refactor: check if game is still active
Browse files Browse the repository at this point in the history
  • Loading branch information
NotSugden committed Aug 1, 2021
1 parent d064607 commit 9251f2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/Patches/CrewmateRoles/AltruistMod/Coroutine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using TownOfUs.CrewmateRoles.MedicMod;
using TownOfUs.Roles;
using UnityEngine;
using InnerNet;
using Object = UnityEngine.Object;

namespace TownOfUs.CrewmateRoles.AltruistMod
Expand Down Expand Up @@ -56,7 +57,7 @@ public static IEnumerator AltruistRevive(DeadBody target, Altruist role)

var player = Utils.PlayerById(parentId);

if (player == null)
if (player == null || AmongUsClient.Instance.GameState != InnerNetClient.GameStates.Started)
yield break;

player.Revive();
Expand Down

0 comments on commit 9251f2f

Please sign in to comment.