Skip to content

Commit 4191c03

Browse files
committed
questionable S2 fixes
1 parent 27d74d4 commit 4191c03

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

pkg/demoinfocs/s2_commands.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ func (p *parser) handleDemoPacket(pack *msgs2.CDemoPacket) {
324324
if msgCreator == nil {
325325
msgCreator = emCreators[msgs2.EBaseEntityMessages(m.t)]
326326
}
327-
} else if m.t < int32(msgs2.ECstrike15UserMessages_CS_UM_RadioText) {
327+
} else if m.t < int32(msgs2.ECstrike15UserMessages_CS_UM_VGUIMenu) {
328328
msgCreator = gameEventCreators[msgs2.EBaseGameEvents(m.t)]
329329
} else if m.t < int32(msgs2.ETEProtobufIds_TE_EffectDispatchId) {
330330
msgCreator = csUsrMsgCreators[msgs2.ECstrike15UserMessages(m.t)]

pkg/demoinfocs/sendtables2/entity.go

+1
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ func (p *Parser) OnPacketEntities(m *msgs2.CSVCMsg_PacketEntities) error {
520520
}
521521
} else {
522522
if e = p.entities[index]; e == nil {
523+
continue
523524
_panicf("unable to find existing entity %d", index)
524525
}
525526

pkg/demoinfocs/stringtables.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ func (p *parser) processStringTableS2(tab createStringTable, br *bit.BitReader)
408408
for _, item := range items {
409409
switch tab.GetName() {
410410
case stNameInstanceBaseline:
411-
if instanceBaselineKeyRegex.MatchString(item.Key) {
411+
if item.Key == "" || instanceBaselineKeyRegex.MatchString(item.Key) {
412412
continue
413413
}
414414

0 commit comments

Comments
 (0)