File tree 2 files changed +13
-1
lines changed 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -570,6 +570,7 @@ const (
570
570
WarnTypeBombsiteUnknown // may occur on de_grind for bombsite B as the bounding box of the bombsite is wrong
571
571
WarnTypeTeamSwapPlayerNil // TODO: figure out why this happens
572
572
WarnTypeGameEventBeforeDescriptors // may occur in POV demos
573
+ WarnUnknownDemoCommandMessageType // occur when we have an unknown EDemoCommands message type, the protobuf messages probably need to be updated
573
574
574
575
// WarnTypeMissingNetMessageDecryptionKey occurs when encrypted net-messages are encountered and the decryption key is missing.
575
576
// See ParserConfig.NetMessageDecryptionKey
Original file line number Diff line number Diff line change @@ -340,6 +340,17 @@ func (p *parser) parseFrameS2() bool {
340
340
341
341
size := p .bitReader .ReadVarInt32 ()
342
342
343
+ msgCreator := demoCommandMsgsCreators [msgType ]
344
+ if msgCreator == nil {
345
+ p .eventDispatcher .Dispatch (events.ParserWarn {
346
+ Message : fmt .Sprintf ("skipping unknown demo commands message type with value %d" , msgType ),
347
+ Type : events .WarnUnknownDemoCommandMessageType ,
348
+ })
349
+ p .bitReader .Skip (int (size ) << 3 )
350
+
351
+ return true
352
+ }
353
+
343
354
buf := p .bitReader .ReadBytes (int (size ))
344
355
345
356
if msgCompressed {
@@ -357,7 +368,7 @@ func (p *parser) parseFrameS2() bool {
357
368
}
358
369
}
359
370
360
- msg := demoCommandMsgsCreators [ msgType ] ()
371
+ msg := msgCreator ()
361
372
362
373
if msg == nil {
363
374
panic (fmt .Sprintf ("Unknown demo command: %d" , msgType ))
You can’t perform that action at this time.
0 commit comments