Skip to content

Commit 15cf137

Browse files
committed
fix: always update player user ID in getOrCreatePlayer
ref akiver/cs-demo-analyzer#28
1 parent b375824 commit 15cf137

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎pkg/demoinfocs/datatables.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ func (p *parser) getOrCreatePlayer(entityID int, rp *common.PlayerInfo) (isNew b
362362
player.Name = rp.Name
363363
player.SteamID64 = rp.XUID
364364
player.IsBot = rp.IsFakePlayer || rp.GUID == "BOT"
365-
player.UserID = userID
366365

367366
p.gameState.indexPlayerBySteamID(player)
368367
}
@@ -377,6 +376,8 @@ func (p *parser) getOrCreatePlayer(entityID int, rp *common.PlayerInfo) (isNew b
377376
}
378377
}
379378

379+
player.UserID = userID
380+
380381
p.gameState.playersByEntityID[entityID] = player
381382

382383
if rp != nil {

0 commit comments

Comments
 (0)