Skip to content

Commit 575c95f

Browse files
authored
Merge pull request #611 from markus-wa/mw/update-protobuufs-15th-oct-25
Fix crash for cs2 update 15th Oct 25
2 parents 20f9184 + bea69de commit 575c95f

File tree

62 files changed

+13115
-13817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+13115
-13817
lines changed

examples/broadcasts/broadcasts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func main() {
4646
if e.PenetratedObjects > 0 {
4747
wallBang = " (WB)"
4848
}
49+
4950
fmt.Printf("%s <%v%s%s> %s\n", formatPlayer(e.Killer), e.Weapon, hs, wallBang, formatPlayer(e.Victim))
5051
})
5152

pkg/demoinfocs/datatables.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ func (p *parser) bindPlayerWeapons(pawnEntity st.Entity, pl *common.Player) {
549549
inventory := make(map[int]*common.Equipment, inventorySize)
550550

551551
for i := 0; i < inventorySize; i++ {
552-
val := pawnEntity.Property(playerWeaponPrefixS2 + fmt.Sprintf("%04d", i)).Value()
552+
val := pawnEntity.Property(playerWeaponPrefixS2 + fmt.Sprintf(".%04d", i)).Value()
553553
if val.Any == nil {
554554
continue
555555
}
@@ -561,7 +561,7 @@ func (p *parser) bindPlayerWeapons(pawnEntity st.Entity, pl *common.Player) {
561561
pl.Inventory = inventory
562562
}
563563

564-
pawnEntity.Property("m_pWeaponServices.m_hMyWeapons").OnUpdate(func(pv st.PropertyValue) {
564+
pawnEntity.Property(playerWeaponPrefixS2).OnUpdate(func(pv st.PropertyValue) {
565565
inventorySize = len(pv.Array())
566566
setPlayerInventory()
567567
})
@@ -598,7 +598,7 @@ func (p *parser) bindPlayerWeapons(pawnEntity st.Entity, pl *common.Player) {
598598
}
599599
}
600600

601-
property := pawnEntity.Property(playerWeaponPrefixS2 + fmt.Sprintf("%04d", i))
601+
property := pawnEntity.Property(playerWeaponPrefixS2 + fmt.Sprintf(".%04d", i))
602602
updateWeapon(property.Value())
603603
property.OnUpdate(updateWeapon)
604604
}

pkg/demoinfocs/events/events.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,12 @@ const (
596596
WarnTypeMissingItemDefinitionIndex
597597
WarnTypeStringTableParsingFailure // Should happen only with CS2 POV demos
598598
WarnTypePacketEntitiesPanic
599+
WarnTypeUnknownProtobufMessage
599600
)
600601

602+
// WarnTypeUnknownDemoCommandMessageType occurs when a demo-command message type is unknown - contact a maintainer.
603+
const WarnTypeUnknownDemoCommandMessageType = WarnUnknownDemoCommandMessageType
604+
601605
// ParserWarn signals that a non-fatal problem occurred during parsing.
602606
type ParserWarn struct {
603607
Message string

pkg/demoinfocs/msg/cs_gameevents.pb.go

Lines changed: 103 additions & 114 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)