@@ -17,22 +17,61 @@ type MatchStartedEvent struct{}
1717// RoundAnnounceMatchStartedEvent signals that the announcement "Match Started" has been displayed.
1818type RoundAnnounceMatchStartedEvent struct {}
1919
20+ // RoundEndReason is the type for the various RoundEndReasonXYZ constants.
21+ //
22+ // See RoundEndedEvent.
23+ type RoundEndReason byte
24+
25+ // RoundEndReason constants give information about why a round ended (Bomb defused, exploded etc.).
26+ const (
27+ RoundEndReasonTargetBombed RoundEndReason = 1
28+ RoundEndReasonVIPEscaped RoundEndReason = 2
29+ RoundEndReasonVIPKilled RoundEndReason = 3
30+ RoundEndReasonTerroristsEscaped RoundEndReason = 4
31+ RoundEndReasonCTStoppedEscape RoundEndReason = 5
32+ RoundEndReasonTerroristsStopped RoundEndReason = 6
33+ RoundEndReasonBombDefused RoundEndReason = 7
34+ RoundEndReasonCTWin RoundEndReason = 8
35+ RoundEndReasonTerroristsWin RoundEndReason = 9
36+ RoundEndReasonDraw RoundEndReason = 10
37+ RoundEndReasonHostagesRescued RoundEndReason = 11
38+ RoundEndReasonTargetSaved RoundEndReason = 12
39+ RoundEndReasonHostagesNotRescued RoundEndReason = 13
40+ RoundEndReasonTerroristsNotEscaped RoundEndReason = 14
41+ RoundEndReasonVIPNotEscaped RoundEndReason = 15
42+ RoundEndReasonGameStart RoundEndReason = 16
43+ RoundEndReasonTerroristsSurrender RoundEndReason = 17
44+ RoundEndReasonCTSurrender RoundEndReason = 18
45+ )
46+
2047// RoundEndedEvent signals that a round just finished.
2148// Attention: TeamState.Score() won't be up to date yet after this.
2249// Add +1 to the winner's score as a workaround.
2350type RoundEndedEvent struct {
2451 Message string
25- Reason common. RoundEndReason
52+ Reason RoundEndReason
2653 Winner common.Team
2754}
2855
2956// RoundOfficiallyEndedEvent signals that the round 'has officially ended', not exactly sure what that is tbh.
3057type RoundOfficiallyEndedEvent struct {}
3158
59+ // RoundMVPReason is the type for the various MVPReasonYXZ constants.
60+ //
61+ // See RoundMVPEvent.
62+ type RoundMVPReason byte
63+
64+ // RoundMVPReasons constants give information about why a player got the MVP award.
65+ const (
66+ MVPReasonMostEliminations RoundMVPReason = 1
67+ MVPReasonBombDefused RoundMVPReason = 2
68+ MVPReasonBombPlanted RoundMVPReason = 3
69+ )
70+
3271// RoundMVPEvent signals the announcement of the last rounds MVP.
3372type RoundMVPEvent struct {
3473 Player * common.Player
35- Reason common. RoundMVPReason
74+ Reason RoundMVPReason
3675}
3776
3877// RoundStartedEvent signals that a new round has started.
@@ -226,6 +265,25 @@ type BombBeginDefuseEvent struct {
226265
227266func (BombBeginDefuseEvent ) implementsBombEventIf () {}
228267
268+ // HitGroup is the type for the various HitGroupXYZ constants.
269+ //
270+ // See PlayerHurtEvent.
271+ type HitGroup byte
272+
273+ // HitGroup constants give information about where a player got hit.
274+ // e.g. head, chest, legs etc.
275+ const (
276+ HitGroupGeneric HitGroup = 0
277+ HitGroupHead HitGroup = 1
278+ HitGroupChest HitGroup = 2
279+ HitGroupStomach HitGroup = 3
280+ HitGroupLeftArm HitGroup = 4
281+ HitGroupRightArm HitGroup = 5
282+ HitGroupLeftLeg HitGroup = 6
283+ HitGroupRightLeg HitGroup = 7
284+ HitGroupGear HitGroup = 10
285+ )
286+
229287// PlayerHurtEvent signals that a player has been damaged.
230288type PlayerHurtEvent struct {
231289 Player * common.Player
@@ -236,7 +294,7 @@ type PlayerHurtEvent struct {
236294 WeaponString string // Wrong for CZ, M4A1-S etc.
237295 HealthDamage int
238296 ArmorDamage int
239- HitGroup common. HitGroup
297+ HitGroup HitGroup
240298}
241299
242300// PlayerBindEvent signals that a player has connected.
0 commit comments