From 6258b73b6df3710a5df1a0c8280472c46060d206 Mon Sep 17 00:00:00 2001 From: John Chadwick Date: Sun, 25 Jun 2023 19:14:40 -0400 Subject: [PATCH] Fix for bonus pang. --- game/room/room.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/room/room.go b/game/room/room.go index 72ccc93..66be5cb 100644 --- a/game/room/room.go +++ b/game/room/room.go @@ -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, }, }) @@ -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")