Skip to content

Commit b96c751

Browse files
committed
🐞 fix: 修正无法加入积分游戏
1 parent 591d734 commit b96c751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

game/backend/src/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export class Controller extends Tiaoom {
172172
async joinPlayer(sender: IPlayer, player: IRoomPlayerOptions & { params?: { passwd: string } }, isCreator: boolean = false, role: PlayerRole = PlayerRole.player) {
173173
const room = this.rooms.find(r => r.id === player.roomId);
174174
if (room) {
175-
const playerInstance = this.players.find(p => p.id === player.id);
175+
const playerInstance = this.players.find(p => p.id === sender.id);
176176
if (room.attrs?.point && !isNaN(room.attrs.point) && room.attrs.point > 0 && playerInstance?.attributes.from !== 'fishpi' && role === PlayerRole.player) {
177177
role = PlayerRole.watcher;
178178
}

0 commit comments

Comments
 (0)