Skip to content

Commit 7083ef6

Browse files
committed
Added extra data fields for Otherdeath struct
1 parent c065873 commit 7083ef6

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

pkg/demoinfocs/events/events.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -504,19 +504,29 @@ type RankUpdate struct {
504504
Player *common.Player // may be nil if the player has already disconnected
505505
}
506506

507+
// SteamID64 converts SteamID32 to the 64-bit SteamID variant and returns the result.
508+
// See https://developer.valvesoftware.com/wiki/SteamID
509+
func (ru RankUpdate) SteamID64() uint64 {
510+
return common.ConvertSteamID32To64(uint32(ru.SteamID32))
511+
}
512+
507513
// OtherDeath signals that there has occured a death of something that is not a player.
508514
// For example chickens.
509515
type OtherDeath struct {
510-
Killer *common.Player // May be nil
516+
Killer *common.Player // May be nil
517+
Weapon *common.Equipment
518+
PenetratedObjects int
519+
NoScope bool
520+
KillerBlind bool
521+
ThroughSmoke bool
522+
511523
OtherType string
512524
OtherID int32
513525
OtherPosition r3.Vector
514526
}
515527

516-
// SteamID64 converts SteamID32 to the 64-bit SteamID variant and returns the result.
517-
// See https://developer.valvesoftware.com/wiki/SteamID
518-
func (ru RankUpdate) SteamID64() uint64 {
519-
return common.ConvertSteamID32To64(uint32(ru.SteamID32))
528+
func (od OtherDeath) IsWallBang() bool {
529+
return od.PenetratedObjects > 0
520530
}
521531

522532
// ItemEquip signals an item was equipped.

0 commit comments

Comments
 (0)