]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
Replaced all uses of Account::active outside of Account by call to active() method
[lugaru.git] / Source / GameTick.cpp
index fab80e9e5ac4c29b7c07fc9422e0e27236ae2d80..1b865f13c9b2b63a77d8478b0d6a21bccf986a42 100644 (file)
@@ -692,8 +692,9 @@ void Game::Loadlevel(const std::string& name)
     damagedealt = 0;
     damagetaken = 0;
 
-    if (Account::active)
-        difficulty = Account::active->getDifficulty();
+    if (Account::hasActive()) {
+        difficulty = Account::active().getDifficulty();
+    }
 
     Hotspot::hotspots.clear();
     Hotspot::current = -1;
@@ -6217,11 +6218,11 @@ void Game::TickOnceAfter()
             if (changedelay > 0 && !Person::players[0]->dead && !won) {
                 //high scores, awards, win
                 if (campaign) {
-                    Account::active->winCampaignLevel(whichchoice, bonustotal, leveltime);
+                    Account::active().winCampaignLevel(whichchoice, bonustotal, leveltime);
                     scoreadded = 1;
                 } else {
                     wonleveltime = leveltime;
-                    Account::active->winLevel(whichlevel, bonustotal - startbonustotal, leveltime);
+                    Account::active().winLevel(whichlevel, bonustotal - startbonustotal, leveltime);
                 }
                 won = 1;
             }
@@ -6264,7 +6265,7 @@ void Game::TickOnceAfter()
 
                     fireSound(firestartsound);
 
-                    Loadlevel(campaignlevels[Account::active->getCampaignChoicesMade()].mapname.c_str());
+                    Loadlevel(campaignlevels[Account::active().getCampaignChoicesMade()].mapname.c_str());
 
                     fireSound();