Skip to content

Commit 08d6bb7

Browse files
committed
Binding event data to otherdeath struct event
1 parent 7083ef6 commit 08d6bb7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/demoinfocs/game_events.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,9 +844,17 @@ func (geh gameEventHandler) otherDeath(data map[string]*msg.CSVCMsg_GameEventKey
844844
otherType := data["othertype"].GetValString()
845845
otherID := data["otherid"].GetValShort()
846846
otherPosition := geh.gameState().entities[int(otherID)].Position()
847+
wepType := common.MapEquipment(data["weapon"].GetValString())
848+
weapon := getPlayerWeapon(killer, wepType)
847849

848850
geh.dispatch(events.OtherDeath{
849-
Killer: killer,
851+
Killer: killer,
852+
Weapon: weapon,
853+
PenetratedObjects: int(data["penetrated"].GetValShort()),
854+
NoScope: data["noscope"].GetValBool(),
855+
ThroughSmoke: data["thrusmoke"].GetValBool(),
856+
KillerBlind: data["attackerblind"].GetValBool(),
857+
850858
OtherType: otherType,
851859
OtherID: otherID,
852860
OtherPosition: otherPosition,

0 commit comments

Comments
 (0)