@@ -208,6 +208,7 @@ func newGameEventHandler(parser *parser, ignoreBombsiteIndexNotFound bool) gameE
208208 "bomb_pickup" : delayIfNoPlayers (geh .bombPickup ), // Bomb picked up
209209 "bomb_planted" : delayIfNoPlayers (geh .bombPlanted ), // Plant finished
210210 "bot_takeover" : delay (geh .botTakeover ), // Bot got taken over
211+ "bullet_damage" : delayIfNoPlayers (geh .bulletDamage ), // CS2 only
211212 "buytime_ended" : nil , // Not actually end of buy time, seems to only be sent once per game at the start
212213 "choppers_incoming_warning" : nil , // Helicopters are coming (Danger zone mode)
213214 "cs_intermission" : nil , // Dunno, only in locally recorded (POV) demo
@@ -653,6 +654,22 @@ func (geh gameEventHandler) HostageRescuedAll(map[string]*msg.CSVCMsg_GameEventK
653654 geh .dispatch (events.HostageRescuedAll {})
654655}
655656
657+ func (geh gameEventHandler ) bulletDamage (data map [string ]* msg.CSVCMsg_GameEventKeyT ) {
658+ event := events.BulletDamage {
659+ Attacker : geh .playerByUserID32 (data ["attacker" ].GetValShort ()),
660+ Victim : geh .playerByUserID32 (data ["victim" ].GetValShort ()),
661+ Distance : data ["distance" ].GetValFloat (),
662+ DamageDirX : data ["damage_dir_x" ].GetValFloat (),
663+ DamageDirY : data ["damage_dir_y" ].GetValFloat (),
664+ DamageDirZ : data ["damage_dir_z" ].GetValFloat (),
665+ NumPenetrations : int (data ["num_penetrations" ].GetValShort ()),
666+ IsNoScope : data ["no_scope" ].GetValBool (),
667+ IsAttackerInAir : data ["in_air" ].GetValBool (),
668+ }
669+
670+ geh .dispatch (event )
671+ }
672+
656673func (geh gameEventHandler ) playerConnect (data map [string ]* msg.CSVCMsg_GameEventKeyT ) {
657674 pl := common.PlayerInfo {
658675 UserID : int (data ["userid" ].GetValShort ()),
0 commit comments