@@ -51,7 +51,7 @@ type Parser struct {
5151 eventDispatcher dp.Dispatcher
5252 currentFrame int // Demo-frame, not ingame-tick
5353 header * common.DemoHeader // Pointer so we can check for nil
54- gameState GameState
54+ gameState * GameState
5555 cancelChan chan struct {} // Non-anime-related, used for aborting the parsing
5656 err error // Contains a error that occurred during parsing if any
5757 errLock sync.Mutex // Used to sync up error mutations between parsing & handling go-routines
@@ -103,7 +103,7 @@ func (p *Parser) Header() common.DemoHeader {
103103// GameState returns the current game-state.
104104// It contains most of the relevant information about the game such as players, teams, scores, grenades etc.
105105func (p * Parser ) GameState () IGameState {
106- return & p .gameState
106+ return p .gameState
107107}
108108
109109// CurrentFrame return the number of the current frame, aka. 'demo-tick' (Since demos often have a different tick-rate than the game).
@@ -232,7 +232,7 @@ func NewParserWithConfig(demostream io.Reader, config ParserConfig) *Parser {
232232 p .rawPlayers = make (map [int ]* playerInfo )
233233 p .triggers = make (map [int ]* boundingBoxInformation )
234234 p .cancelChan = make (chan struct {}, 1 )
235- p .gameState = * newGameState ()
235+ p .gameState = newGameState ()
236236 p .grenadeModelIndices = make (map [int ]common.EquipmentElement )
237237
238238 // Attach proto msg handlers
0 commit comments