fixed pointers

This commit is contained in:
nwoik 2025-10-24 19:09:51 +01:00
parent 24f9838eee
commit 000aac92ec

View File

@ -11,15 +11,15 @@ import (
)
type RaceResultPlayer struct {
Pid *int `json:"pid"`
FinishTimeMs *int `json:"finish_time_ms"`
CharacterId *int `json:"character_id"`
KartId *int `json:"kart_id"`
Pid int `json:"pid"`
FinishTimeMs int `json:"finish_time_ms"`
CharacterId int `json:"character_id"`
KartId int `json:"kart_id"`
}
type RaceResult struct {
ClientReportVersion string `json:"client_report_version"`
Player RaceResultPlayer `json:"player"`
ClientReportVersion string `json:"client_report_version"`
Player *RaceResultPlayer `json:"player"`
}
func (g *GameSpySession) handleWWFCReport(command common.GameSpyCommand) {
@ -98,10 +98,10 @@ func (g *GameSpySession) handleWWFCReport(command common.GameSpyCommand) {
player := raceResult.Player
logging.Info(g.ModuleName,
"Player",
"- PID:", aurora.Cyan(strconv.Itoa(*player.Pid)),
"Time:", aurora.Cyan(strconv.Itoa(*player.FinishTimeMs)), "ms",
"Char:", aurora.Cyan(strconv.Itoa(*player.CharacterId)),
"Kart:", aurora.Cyan(strconv.Itoa(*player.KartId)))
"- PID:", aurora.Cyan(strconv.Itoa(player.Pid)),
"Time:", aurora.Cyan(strconv.Itoa(player.FinishTimeMs)), "ms",
"Char:", aurora.Cyan(strconv.Itoa(player.CharacterId)),
"Kart:", aurora.Cyan(strconv.Itoa(player.KartId)))
//TODO : Hand off to qr2 for processing instead of logging each field here
}
}