File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,11 @@ type Kill struct {
142142 IsHeadshot bool
143143}
144144
145+ // IsWallBang returns true if PenetratedObjects is larger than 0.
146+ func (k Kill ) IsWallBang () bool {
147+ return k .PenetratedObjects > 0
148+ }
149+
145150// BotTakenOver signals that a player took over a bot.
146151type BotTakenOver struct {
147152 Taker * common.Player
Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ func TestRankUpdate_SteamID64(t *testing.T) {
4949 assert .Equal (t , uint64 (76561198012952267 ), event .SteamID64 ())
5050}
5151
52+ func TestKill_IsWallBang (t * testing.T ) {
53+ event := Kill {PenetratedObjects : 1 }
54+
55+ assert .True (t , event .IsWallBang ())
56+ }
57+
5258type demoInfoProviderMock struct {
5359}
5460
You can’t perform that action at this time.
0 commit comments