diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-01-19 21:13:23 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-01-19 21:13:23 -0500 |
commit | 568ba2757e0b2947a8578128ff8f0a70eb075b38 (patch) | |
tree | 196d64063fe2eeaa15e4ad25e33fc75f334a7563 /src/SMAPI/Framework | |
parent | a59572ee4eb64b075836247b92401c0fb554b6f0 (diff) | |
download | SMAPI-568ba2757e0b2947a8578128ff8f0a70eb075b38.tar.gz SMAPI-568ba2757e0b2947a8578128ff8f0a70eb075b38.tar.bz2 SMAPI-568ba2757e0b2947a8578128ff8f0a70eb075b38.zip |
fix events being raised while the game is loading a save (#424)
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r-- | src/SMAPI/Framework/SGame.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs index 4a17926c..2eb2da99 100644 --- a/src/SMAPI/Framework/SGame.cs +++ b/src/SMAPI/Framework/SGame.cs @@ -229,6 +229,13 @@ namespace StardewModdingAPI.Framework return; } + // game is asynchronously loading a save, block mod events to avoid conflicts + if (Game1.gameMode == Game1.loadingMode) + { + base.Update(gameTime); + return; + } + /********* ** Save events + suppress events during save *********/ |