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 {
499
499
TableName string
500
500
}
501
501
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
+
502
510
// ParserWarn signals that a non-fatal problem occurred during parsing.
503
511
type ParserWarn struct {
504
512
Message string
513
+ Type WarnType
505
514
}
506
515
507
516
// GenericGameEvent signals any game-event.
Original file line number Diff line number Diff line change 1
1
package demoinfocs
2
2
3
3
import (
4
- "errors"
5
4
"fmt"
6
5
7
6
"github.com/golang/geo/r3"
@@ -652,7 +651,12 @@ func (geh gameEventHandler) bombEvent(data map[string]*msg.CSVCMsg_GameEventKeyT
652
651
bombEvent .Site = events .BombsiteB
653
652
geh .parser .bombsiteB .index = site
654
653
} 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
+ })
656
660
}
657
661
}
658
662
You can’t perform that action at this time.
0 commit comments