Achievements could be unlocked in custom levels/make and play, so this adds the wrapper function `game.unlockAchievement` which calls `NETWORK_unlockAchievement` if `map.custommode` is false.
Also, this function and `Game::unlocknum` have both been `ifdef`ed to be empty if MAKEANDPLAY is defined.
This commit is contained in:
AllyTally
2020-08-01 16:49:07 -03:00
committed by Ethan Lee
parent c8b4c0f1e7
commit 06e5eb38d9
4 changed files with 47 additions and 38 deletions

View File

@@ -683,7 +683,7 @@ void gamelogic()
game.swnrank = 1;
if (game.swnbestrank < 1)
{
NETWORK_unlockAchievement("vvvvvvsupgrav5");
game.unlockAchievement("vvvvvvsupgrav5");
game.swnbestrank = 1;
game.swnmessage = 2+30;
music.playef(26);
@@ -694,7 +694,7 @@ void gamelogic()
game.swnrank = 2;
if (game.swnbestrank < 2)
{
NETWORK_unlockAchievement("vvvvvvsupgrav10");
game.unlockAchievement("vvvvvvsupgrav10");
game.swnbestrank = 2;
game.swnmessage = 2+30;
music.playef(26);
@@ -705,7 +705,7 @@ void gamelogic()
game.swnrank = 3;
if (game.swnbestrank < 3)
{
NETWORK_unlockAchievement("vvvvvvsupgrav15");
game.unlockAchievement("vvvvvvsupgrav15");
game.swnbestrank = 3;
game.swnmessage = 2+30;
music.playef(26);
@@ -716,7 +716,7 @@ void gamelogic()
game.swnrank = 4;
if (game.swnbestrank < 4)
{
NETWORK_unlockAchievement("vvvvvvsupgrav20");
game.unlockAchievement("vvvvvvsupgrav20");
game.swnbestrank = 4;
game.swnmessage = 2+30;
music.playef(26);
@@ -727,7 +727,7 @@ void gamelogic()
game.swnrank = 5;
if (game.swnbestrank < 5)
{
NETWORK_unlockAchievement("vvvvvvsupgrav30");
game.unlockAchievement("vvvvvvsupgrav30");
game.swnbestrank = 5;
game.swnmessage = 2+30;
music.playef(26);
@@ -738,7 +738,7 @@ void gamelogic()
game.swnrank = 6;
if (game.swnbestrank < 6)
{
NETWORK_unlockAchievement("vvvvvvsupgrav60");
game.unlockAchievement("vvvvvvsupgrav60");
game.swnbestrank = 6;
game.swnmessage = 2+30;
music.playef(26);