388 SendStat(siCustomAchievement, string.format(loc("%s bravely climbed up to a dizzy height of %d to reach home."),loc(GetHogName(CurrentHedgehog)), getActualHeight(RecordHeight))) |
388 SendStat(siCustomAchievement, string.format(loc("%s bravely climbed up to a dizzy height of %d to reach home."),loc(GetHogName(CurrentHedgehog)), getActualHeight(RecordHeight))) |
389 SendStat(siPointType, loc("seconds")) |
389 SendStat(siPointType, loc("seconds")) |
390 SendStat(siPlayerKills, tostring(roundedFinishTime), loc(GetHogTeamName(CurrentHedgehog))) |
390 SendStat(siPlayerKills, tostring(roundedFinishTime), loc(GetHogTeamName(CurrentHedgehog))) |
391 |
391 |
392 EndGame() |
392 EndGame() |
|
393 onAchievementsDeclaration() |
393 YouWon = true |
394 YouWon = true |
394 end |
395 end |
395 elseif distanceFromWater < 0 and not YouLost then |
396 elseif distanceFromWater < 0 and not YouLost then |
396 makeMultiPlayerLoserStat(CurrentHedgehog) |
397 makeMultiPlayerLoserStat(CurrentHedgehog) |
397 deadHedgehogs = deadHedgehogs + 1 |
398 deadHedgehogs = deadHedgehogs + 1 |
398 YouLost = true |
399 YouLost = true |
399 if deadHedgehogs >= totalHedgehogs then |
400 if deadHedgehogs >= totalHedgehogs then |
400 makeFinalMultiPlayerStats() |
401 makeFinalMultiPlayerStats() |
401 EndGame() |
402 EndGame() |
|
403 onAchievementsDeclaration() |
402 end |
404 end |
403 end |
405 end |
404 |
406 |
405 if GameTime % 500 == 0 then |
407 if GameTime % 500 == 0 then |
406 --if isSinglePlayer and MaxHeight < 32000 and WaterRise == nil then |
408 --if isSinglePlayer and MaxHeight < 32000 and WaterRise == nil then |
596 SendStat(siCustomAchievement, string.format(text, RecordHeightHogName)) |
599 SendStat(siCustomAchievement, string.format(text, RecordHeightHogName)) |
597 end |
600 end |
598 SendStat(siPointType, loc("points")) |
601 SendStat(siPointType, loc("points")) |
599 SendStat(siPlayerKills, actualHeight, loc(GetHogTeamName(CurrentHedgehog))) |
602 SendStat(siPlayerKills, actualHeight, loc(GetHogTeamName(CurrentHedgehog))) |
600 EndGame() |
603 EndGame() |
|
604 onAchievementsDeclaration() |
601 end |
605 end |
602 |
606 |
603 function makeMultiPlayerLoserStat(gear) |
607 function makeMultiPlayerLoserStat(gear) |
604 local teamName = GetHogTeamName(gear) |
608 local teamName = GetHogTeamName(gear) |
605 local actualHeight = getActualHeight(MaxHeight) |
609 local actualHeight = getActualHeight(MaxHeight) |