Skip to content

Commit

Permalink
FixStupid
Browse files Browse the repository at this point in the history
  • Loading branch information
louis1706 committed Apr 4, 2024
1 parent bd651df commit 2e48127
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Exiled.Events/Patches/Events/Player/Spawning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private static MethodInfo TargetMethod()

private static bool Prefix(ReferenceHub hub, PlayerRoleBase prevRole, PlayerRoleBase newRole)
{
if (newRole.ServerSpawnReason == RoleChangeReason.Destroyed || Player.TryGet(hub, out Player player))
if (newRole.ServerSpawnReason == RoleChangeReason.Destroyed || !Player.TryGet(hub, out Player player))
return true;

Vector3 oldPosition = hub.transform.position;
Expand Down

0 comments on commit 2e48127

Please sign in to comment.