Skip to content

Commit 6852d15

Browse files
committed
Merge remote-tracking branch 'origin/master' into mw/update-protos-28.07.25
2 parents 6a7b303 + e53286d commit 6852d15

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

pkg/demoinfocs/common/player.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,21 @@ func (p *Player) Weapons() []*Equipment {
175175
return res
176176
}
177177

178+
// FlashbangCount returns the amount of flashbangs the player currently has in his inventory.
179+
func (p *Player) FlashbangCount() uint64 {
180+
pawn := p.PlayerPawnEntity()
181+
if pawn == nil {
182+
return 0
183+
}
184+
185+
flashCountProp, ok := pawn.PropertyValue("m_pWeaponServices.m_iAmmo.0014")
186+
if !ok {
187+
return 0
188+
}
189+
190+
return flashCountProp.UInt64()
191+
}
192+
178193
// IsSpottedBy returns true if the player has been spotted by the other player.
179194
// This is NOT "Line of Sight" / FOV - look up "CSGO TraceRay" for that.
180195
// May not behave as expected with multiple spotters.
15.3 KB
Binary file not shown.

pkg/demoinfocs/s2_commands.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,11 @@ func getGameEventListBinForProtocol(networkProtocol int) ([]byte, error) {
396396
case networkProtocol < 14069:
397397
return eventListFolder.ReadFile("event-list-dump/14023.bin")
398398

399-
default:
399+
case networkProtocol < 14089:
400400
return eventListFolder.ReadFile("event-list-dump/14070.bin")
401+
402+
default:
403+
return eventListFolder.ReadFile("event-list-dump/14089.bin")
401404
}
402405
}
403406

0 commit comments

Comments
 (0)