game: online: recoded but collision not work
This commit is contained in:
@ -45,11 +45,11 @@ class GameModel(models.Model):
|
||||
|
||||
return score_data
|
||||
|
||||
def add_goal(self, goal_taker_id: int):
|
||||
def add_goal(self, goal_defenser: User):
|
||||
|
||||
timestamp: int = round(time.time() * 1000, 1) - self.start_timestamp
|
||||
|
||||
goal_model: GameGoalModel = GameGoalModel.objects.create(player_id = goal_taker_id, game_id = self.pk, timestamp = timestamp)
|
||||
goal_model: GameGoalModel = GameGoalModel(player=goal_defenser, game=self, timestamp=timestamp)
|
||||
|
||||
goal_model.save()
|
||||
|
||||
|
Reference in New Issue
Block a user