Skip to content

Commit 67a3595

Browse files
authored
feat: add more kill event data (#270)
1 parent 553b695 commit 67a3595

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

pkg/demoinfocs/events/events.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ type Kill struct {
140140
Assister *common.Player
141141
PenetratedObjects int
142142
IsHeadshot bool
143+
AssistedFlash bool
144+
AttackerBlind bool
145+
NoScope bool
146+
ThroughSmoke bool
147+
Distance float32
143148
}
144149

145150
// IsWallBang returns true if PenetratedObjects is larger than 0.

pkg/demoinfocs/game_events.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,11 @@ func (geh gameEventHandler) playerDeath(data map[string]*msg.CSVCMsg_GameEventKe
336336
IsHeadshot: data["headshot"].GetValBool(),
337337
PenetratedObjects: int(data["penetrated"].GetValShort()),
338338
Weapon: geh.getEquipmentInstance(killer, wepType),
339+
AssistedFlash: data["assistedflash"].GetValBool(),
340+
AttackerBlind: data["attackerblind"].GetValBool(),
341+
NoScope: data["noscope"].GetValBool(),
342+
ThroughSmoke: data["thrusmoke"].GetValBool(),
343+
Distance: data["distance"].GetValFloat(),
339344
})
340345
}
341346

test/default.golden

3.31 KB
Binary file not shown.

0 commit comments

Comments
 (0)