@@ -210,7 +210,7 @@ func newGameEventHandler(parser *parser, ignoreBombsiteIndexNotFound bool) gameE
210210 "item_pickup_slerp" : nil , // Not sure, only in locally recorded (POV) demos
211211 "item_remove" : geh .itemRemove , // Dropped?
212212 "jointeam_failed" : nil , // Dunno, only in locally recorded (POV) demos
213- "other_death" : nil , // Dunno
213+ "other_death" : geh . otherDeath , // Dunno
214214 "player_blind" : delay (geh .playerBlind ), // Player got blinded by a flash. Delayed because Player.FlashDuration hasn't been updated yet
215215 "player_changename" : nil , // Name change
216216 "player_connect" : geh .playerConnect , // Bot connected or player reconnected, players normally come in via string tables & data tables
@@ -839,6 +839,20 @@ func (geh gameEventHandler) itemRemove(data map[string]*msg.CSVCMsg_GameEventKey
839839 })
840840}
841841
842+ func (geh gameEventHandler ) otherDeath (data map [string ]* msg.CSVCMsg_GameEventKeyT ) {
843+ killer := geh .playerByUserID32 (data ["attacker" ].GetValShort ())
844+ otherType := data ["othertype" ].GetValString ()
845+ otherID := data ["otherid" ].GetValShort ()
846+ otherPosition := geh .gameState ().entities [int (otherID )].Position ()
847+
848+ geh .dispatch (events.OtherDeath {
849+ Killer : killer ,
850+ OtherType : otherType ,
851+ OtherID : otherID ,
852+ OtherPosition : otherPosition ,
853+ })
854+ }
855+
842856func (geh gameEventHandler ) itemEvent (data map [string ]* msg.CSVCMsg_GameEventKeyT ) (* common.Player , * common.Equipment ) {
843857 player := geh .playerByUserID32 (data ["userid" ].GetValShort ())
844858
0 commit comments