Skip to content

Commit

Permalink
Fix for bonus pang.
Browse files Browse the repository at this point in the history
  • Loading branch information
jchv committed Jun 25, 2023
1 parent 76f8583 commit 6258b73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions game/room/room.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ func (r *Room) handleRoomGameTurnEnd(ctx context.Context, event RoomGameTurnEnd)
Nickname: common.ToPString(pair.Value.Entry.Nickname),
},
GameEnd: &gamepacket.GameEnd{
Score: pair.Value.Score,
Score: 0, // ?
Pang: pair.Value.Pang,
},
})
Expand Down Expand Up @@ -683,7 +683,7 @@ func (r *Room) handleRoomGameShotSync(ctx context.Context, event RoomGameShotSyn
})
if pair := r.players.GetPair(r.state.ShotSync.ActiveConnID); pair != nil {
pair.Value.Pang += uint64(r.state.ShotSync.Pang)
pair.Value.BonusPang += uint64(r.state.ShotSync.Pang)
pair.Value.BonusPang += uint64(r.state.ShotSync.BonusPang)
pair.Value.Stroke++
} else {
log.WithField("ConnID", r.state.ShotSync.ActiveConnID).Warn("couldn't find conn")
Expand Down

0 comments on commit 6258b73

Please sign in to comment.