Skip to content

Commit a0574a2

Browse files
committed
linting: fix struct misalignments
1 parent 0042680 commit a0574a2

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

common/player.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import (
99

1010
// Player contains mostly game-relevant player information.
1111
type Player struct {
12+
tickRate float64 // the in-game tick rate, used for IsBlinded()
13+
ingameTickProvider ingameTickProvider // provider for the current in-game tick, used for IsBlinded()
14+
1215
SteamID int64 // int64 representation of the User's Steam ID
1316
Position r3.Vector // In-game coordinates. Like the one you get from cl_showpos 1
1417
LastAlivePosition r3.Vector // The location where the player was last alive. Should be equal to Position if the player is still alive.
@@ -29,19 +32,16 @@ type Player struct {
2932
AdditionalPlayerInformation *AdditionalPlayerInformation // Mostly scoreboard information such as kills, deaths, etc.
3033
ViewDirectionX float32
3134
ViewDirectionY float32
32-
FlashDuration float32 // Blindness duration from the flashbang currently affecting the player (seconds)
33-
FlashTick int // In-game tick at which the player was last flashed
34-
Team Team
35+
FlashDuration float32 // Blindness duration from the flashbang currently affecting the player (seconds)
36+
FlashTick int // In-game tick at which the player was last flashed
3537
TeamState *TeamState // When keeping the reference make sure you notice when the player changes teams
38+
Team Team
3639
IsBot bool
3740
IsConnected bool
3841
IsDucking bool
3942
IsDefusing bool
4043
HasDefuseKit bool
4144
HasHelmet bool
42-
43-
tickRate float64 // the in-game tick rate, used for IsBlinded()
44-
ingameTickProvider ingameTickProvider // provider for the current in-game tick, used for IsBlinded()
4545
}
4646

4747
// IsAlive returns true if the Hp of the player are > 0.

events/events.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,17 @@ type Footstep struct {
111111
type PlayerTeamChange struct {
112112
Player *common.Player
113113

114-
NewTeam common.Team
115114
// TeamState of the old team.
116115
// May be nil if player changed from spectators/unassigned (OldTeam == TeamSpectators || OldTeam == TeamUnassigned).
117116
NewTeamState *common.TeamState
118117

119-
OldTeam common.Team
120118
// TeamState of the old team.
121119
// May be nil if player changed from spectators/unassigned (OldTeam == TeamSpectators || OldTeam == TeamUnassigned).
122120
OldTeamState *common.TeamState
123121

122+
NewTeam common.Team
123+
OldTeam common.Team
124+
124125
Silent bool
125126
IsBot bool
126127
}

0 commit comments

Comments
 (0)