Skip to content

Commit

Permalink
Fixed Bug #2
Browse files Browse the repository at this point in the history
There is a possibility that the player dies when loading the new map, this may cause the player to respawn on the new map and play as if nothing happened.
  • Loading branch information
MrDave1999 committed Apr 23, 2021
1 parent f6bc495 commit 49a036d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CaptureTheFlag/CaptureTheFlag/Events/GameMode.OnSpawn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected override void OnPlayerSpawned(BasePlayer sender, SpawnEventArgs e)
{
base.OnPlayerSpawned(sender, e);
var player = sender as Player;
if(player.PlayerTeam == null)
if(player.PlayerTeam == null || CurrentMap.IsLoading)
{
player.SetForceClass();
return;
Expand Down

0 comments on commit 49a036d

Please sign in to comment.