Skip to content

Commit

Permalink
Insert coop_leaderboard.player_count for coop game
Browse files Browse the repository at this point in the history
Inserts the required `coop_leaderboard.player_count` column when a coop
game is finished.

Fixes #310
  • Loading branch information
duk3luk3 authored and micheljung committed Aug 21, 2017
1 parent e8b8f3c commit e930381
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/gameconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ async def handle_action(self, command, args):
return

await cursor.execute("INSERT INTO `coop_leaderboard`"
"(`mission`, `gameuid`, `secondary`, `time`) "
"VALUES (%s, %s, %s, %s);",
(mission, self.game.id, secondary, delta))
"(`mission`, `gameuid`, `secondary`, `time`, `player_count`) "
"VALUES (%s, %s, %s, %s, %s);",
(mission, self.game.id, secondary, delta, len(self.game.players)))
elif command == 'JsonStats':
await self.game.report_army_stats(args[0])

Expand Down

0 comments on commit e930381

Please sign in to comment.