File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -499,9 +499,18 @@ type StringTableCreated struct {
499499 TableName string
500500}
501501
502+ // WarnType identifies a kind of warning for the ParserWarn event.
503+ type WarnType int
504+
505+ const (
506+ WarnTypeUndefined = iota
507+ WarnTypeBombsiteUnknown // may occur on de_grind for bombsite B as the bounding box of the bombsite is wrong
508+ )
509+
502510// ParserWarn signals that a non-fatal problem occurred during parsing.
503511type ParserWarn struct {
504512 Message string
513+ Type WarnType
505514}
506515
507516// GenericGameEvent signals any game-event.
Original file line number Diff line number Diff line change 11package demoinfocs
22
33import (
4- "errors"
54 "fmt"
65
76 "github.com/golang/geo/r3"
@@ -652,7 +651,12 @@ func (geh gameEventHandler) bombEvent(data map[string]*msg.CSVCMsg_GameEventKeyT
652651 bombEvent .Site = events .BombsiteB
653652 geh .parser .bombsiteB .index = site
654653 } else {
655- return bombEvent , errors .New ("bomb not planted on bombsite A or B" )
654+ // this may occur on de_grind for bombsite B, really makes you think
655+ // see https://github.com/markus-wa/demoinfocs-golang/issues/280
656+ geh .dispatch (events.ParserWarn {
657+ Message : "bombsite unknown for bomb related event" ,
658+ Type : events .WarnTypeBombsiteUnknown ,
659+ })
656660 }
657661 }
658662
You can’t perform that action at this time.
0 commit comments