Skip to content

Commit 7f4e82c

Browse files
committed
fix: Unfreeze() bug
1 parent d7fe321 commit 7f4e82c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

T3Menu-API/src/T3MenuAPI/Classes/FreezePlayer.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ public static void Unfreeze(this CCSPlayerController player)
2828

2929
if (_playerSavedSpeed.TryGetValue(player, out float originalSpeed))
3030
{
31-
player.PlayerPawn.Value.VelocityModifier = originalSpeed;
32-
_playerSavedSpeed.Remove(player);
31+
Server.NextFrame(() =>
32+
{
33+
player.PlayerPawn.Value.VelocityModifier = originalSpeed;
34+
_playerSavedSpeed.Remove(player);
35+
});
3336
}
3437
}
3538
public static void UpdateFrozenPlayers()

0 commit comments

Comments
 (0)