Declare achievements alongwith EndGame call, since it would skip SendStats 0.9.22
authorunc0rr
Mon, 28 Mar 2016 21:20:11 +0300
branch0.9.22
changeset 12374 d75c666e2d21
parent 12373 1e7a50e91d0c
child 12375 d974b32ab58b
Declare achievements alongwith EndGame call, since it would skip SendStats
share/hedgewars/Data/Maps/ClimbHome/map.lua
--- a/share/hedgewars/Data/Maps/ClimbHome/map.lua	Thu Mar 24 14:40:59 2016 +0300
+++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua	Mon Mar 28 21:20:11 2016 +0300
@@ -390,6 +390,7 @@
                     SendStat(siPlayerKills, tostring(roundedFinishTime), loc(GetHogTeamName(CurrentHedgehog)))
 
                     EndGame()
+                    onAchievementsDeclaration()
                     YouWon = true
                 end
             elseif distanceFromWater < 0 and not YouLost then
@@ -399,6 +400,7 @@
                 if deadHedgehogs >= totalHedgehogs then
                     makeFinalMultiPlayerStats()
                     EndGame()
+                    onAchievementsDeclaration()
                 end
             end
 
@@ -550,6 +552,7 @@
             if deadHedgehogs >= totalHedgehogs then
                 makeFinalMultiPlayerStats()
                 EndGame()
+                onAchievementsDeclaration()
             end
             makeMultiPlayerLoserStat(gear)
         end
@@ -598,6 +601,7 @@
     SendStat(siPointType, loc("points"))
     SendStat(siPlayerKills, actualHeight, loc(GetHogTeamName(CurrentHedgehog)))
     EndGame()
+    onAchievementsDeclaration()
 end
 
 function makeMultiPlayerLoserStat(gear)