Skip to content

Commit 8e37a8d

Browse files
committed
docs: add some SteamID notes
1 parent a2ec66e commit 8e37a8d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pkg/demoinfocs/common/player.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const (
2121
type Player struct {
2222
demoInfoProvider demoInfoProvider // provider for demo info such as tick-rate or current tick
2323

24-
SteamID64 uint64 // 64-bit representation of the user's Steam ID
24+
SteamID64 uint64 // 64-bit representation of the user's Steam ID. See https://developer.valvesoftware.com/wiki/SteamID
2525
LastAlivePosition r3.Vector // The location where the player was last alive. Should be equal to Position if the player is still alive.
2626
UserID int // Mostly used in game-events to address this player
2727
Name string // Steam / in-game user name

pkg/demoinfocs/events/events.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,14 +410,15 @@ type ChatMessage struct {
410410
// RankUpdate signals the new rank. Not sure if this
411411
// only occurs if the rank changed.
412412
type RankUpdate struct {
413-
SteamID32 int32
413+
SteamID32 int32 // 32-bit variant of the SteamID. See https://developer.valvesoftware.com/wiki/SteamID
414414
RankChange float32
415415
RankOld int
416416
RankNew int
417417
WinCount int
418418
}
419419

420-
// SteamID64 converts SteamID32 from the 32-bit SteamID to a 64-bit variant
420+
// SteamID64 converts SteamID32 to the 64-bit SteamID variant and returns the result.
421+
// See https://developer.valvesoftware.com/wiki/SteamID
421422
func (ru RankUpdate) SteamID64() uint64 {
422423
return common.ConvertSteamID32To64(uint32(ru.SteamID32))
423424
}

0 commit comments

Comments
 (0)