Declare achievements alongwith EndGame call, since it would skip SendStats
authorunc0rr
Mon, 28 Mar 2016 21:20:11 +0300
changeset 11623 515d2d38ab8b
parent 11621 968bff2534ca
child 11624 56aa40beedf0
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	Fri Mar 25 11:21:18 2016 -0400
+++ 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)