Skip to content

Commit

Permalink
Fix multiplayer power modifier after saveload.
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Apr 17, 2021
1 parent e3c4d6f commit 847496e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/mp/multiplay/script/rules/events/gameloaded.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
function eventGameLoaded()
{
setupGame();
queue("setupPowerModifierGameLoaded", 100);
}
9 changes: 9 additions & 0 deletions data/mp/multiplay/script/rules/setup/powermodifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ function setupPowerModifier(player)
setPowerModifier(70 + 5 * powerType, player);
}
}

// Power modifier data is currently not saved. Reset it during eventGameLoaded for the moment.
function setupPowerModifierGameLoaded()
{
for (let i = 0; i < maxPlayers; ++i)
{
setupPowerModifier(i);
}
}

0 comments on commit 847496e

Please sign in to comment.