Skip to content

Commit

Permalink
Prevent crash when someone is emoting while logging in
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed May 27, 2022
1 parent ceae165 commit 718c2dc
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,14 @@ public void NotifyMapEffect(MapEffect effect, byte strength = 0)

public void NotifyEmote(short playerId, Emote emote)
{
Animator.Emote(playerId, emote);
try
{
Animator.Emote(playerId, emote);
}
catch (InvalidOperationException)
{
// if still transitioning to in-game state, the game will crash because the in-game control set is not completely set up yet
}
}

public void MakeMainPlayerDrunk()
Expand Down

0 comments on commit 718c2dc

Please sign in to comment.