You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: parser.go
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,13 @@ import (
5
5
"sync"
6
6
"time"
7
7
8
-
r3 "github.com/golang/geo/r3"
8
+
"github.com/gogo/protobuf/proto"
9
+
"github.com/golang/geo/r3"
9
10
dp "github.com/markus-wa/godispatch"
10
11
11
12
bit "github.com/markus-wa/demoinfocs-golang/bitread"
12
-
common "github.com/markus-wa/demoinfocs-golang/common"
13
-
msg "github.com/markus-wa/demoinfocs-golang/msg"
13
+
"github.com/markus-wa/demoinfocs-golang/common"
14
+
"github.com/markus-wa/demoinfocs-golang/msg"
14
15
st "github.com/markus-wa/demoinfocs-golang/sendtables"
15
16
)
16
17
@@ -73,6 +74,11 @@ type Parser struct {
73
74
delayedEvents []interface{} // Contains events that need to be dispatched at the end of a tick (e.g. flash events because FlashDuration isn't updated before that)
74
75
}
75
76
77
+
// NetMessageCreator creates additional net-messages to be dispatched to net-message handlers.
78
+
//
79
+
// See also: ParserConfig.AdditionalNetMessageCreators & Parser.RegisterNetMessageHandler()
80
+
typeNetMessageCreatorfunc() proto.Message
81
+
76
82
typebombsitestruct {
77
83
indexint
78
84
center r3.Vector
@@ -210,7 +216,7 @@ type ParserConfig struct {
210
216
// AdditionalNetMessageCreators maps net-message-IDs to creators (instantiators).
211
217
// The creators should return a new instance of the correct protobuf-message type (from the msg package).
212
218
// Interesting net-message-IDs can easily be discovered with the build-tag 'debugdemoinfocs'; when looking for 'UnhandledMessage'.
213
-
// Check out demopacket.go to see which net-messages are already being parsed by default.
219
+
// Check out parsing.go to see which net-messages are already being parsed by default.
214
220
// This is a beta feature and may be changed or replaced without notice.
0 commit comments