@@ -42,7 +42,7 @@ type DemoHeader struct {
4242// Not necessarily the tick-rate the server ran on during the game.
4343//
4444// Returns 0 if PlaybackTime or PlaybackFrames are 0 (corrupt demo headers).
45- func (h DemoHeader ) FrameRate () float64 {
45+ func (h * DemoHeader ) FrameRate () float64 {
4646 if h .PlaybackTime == 0 {
4747 return 0
4848 }
@@ -53,7 +53,7 @@ func (h DemoHeader) FrameRate() float64 {
5353// FrameTime returns the time a frame / demo-tick takes in seconds.
5454//
5555// Returns 0 if PlaybackTime or PlaybackFrames are 0 (corrupt demo headers).
56- func (h DemoHeader ) FrameTime () time.Duration {
56+ func (h * DemoHeader ) FrameTime () time.Duration {
5757 if h .PlaybackFrames == 0 {
5858 return 0
5959 }
@@ -75,14 +75,14 @@ type GrenadeProjectile struct {
7575}
7676
7777// Position returns the current position of the grenade projectile in world coordinates.
78- func (g GrenadeProjectile ) Position () r3.Vector {
78+ func (g * GrenadeProjectile ) Position () r3.Vector {
7979 return g .Entity .Position ()
8080}
8181
8282// UniqueID returns the unique id of the grenade.
8383// The unique id is a random int generated internally by this library and can be used to differentiate
8484// grenades from each other. This is needed because demo-files reuse entity ids.
85- func (g GrenadeProjectile ) UniqueID () int64 {
85+ func (g * GrenadeProjectile ) UniqueID () int64 {
8686 return g .uniqueID
8787}
8888
@@ -104,7 +104,7 @@ type Bomb struct {
104104// Position returns the current position of the bomb.
105105// This is either the position of the player holding it
106106// or LastOnGroundPosition if it's dropped or planted.
107- func (b Bomb ) Position () r3.Vector {
107+ func (b * Bomb ) Position () r3.Vector {
108108 if b .Carrier != nil {
109109 return b .Carrier .Position ()
110110 }
@@ -124,39 +124,39 @@ type TeamState struct {
124124}
125125
126126// Team returns the team for which the TeamState contains data.
127- func (ts TeamState ) Team () Team {
127+ func (ts * TeamState ) Team () Team {
128128 return ts .team
129129}
130130
131131// ID returns the team ID, this stays the same even after switching sides.
132- func (ts TeamState ) ID () int {
132+ func (ts * TeamState ) ID () int {
133133 return getInt (ts .Entity , "m_iTeamNum" )
134134}
135135
136136// Score returns the current score of the team (usually 0-16 without overtime).
137- func (ts TeamState ) Score () int {
137+ func (ts * TeamState ) Score () int {
138138 return getInt (ts .Entity , "m_scoreTotal" )
139139}
140140
141141// ClanName returns the team name (e.g. Fnatic).
142- func (ts TeamState ) ClanName () string {
142+ func (ts * TeamState ) ClanName () string {
143143 return getString (ts .Entity , "m_szClanTeamname" )
144144}
145145
146146// Flag returns the flag code (e.g. DE, FR, etc.).
147147//
148148// Watch out, in some demos this is upper-case and in some lower-case.
149- func (ts TeamState ) Flag () string {
149+ func (ts * TeamState ) Flag () string {
150150 return getString (ts .Entity , "m_szTeamFlagImage" )
151151}
152152
153153// Members returns the players that are members of the team.
154- func (ts TeamState ) Members () []* Player {
154+ func (ts * TeamState ) Members () []* Player {
155155 return ts .membersCallback (ts .team )
156156}
157157
158158// CurrentEquipmentValue returns the cumulative value of all equipment currently owned by the members of the team.
159- func (ts TeamState ) CurrentEquipmentValue () (value int ) {
159+ func (ts * TeamState ) CurrentEquipmentValue () (value int ) {
160160 for _ , pl := range ts .Members () {
161161 value += pl .EquipmentValueCurrent ()
162162 }
@@ -165,7 +165,7 @@ func (ts TeamState) CurrentEquipmentValue() (value int) {
165165}
166166
167167// RoundStartEquipmentValue returns the cumulative value of all equipment owned by the members of the team at the start of the current round.
168- func (ts TeamState ) RoundStartEquipmentValue () (value int ) {
168+ func (ts * TeamState ) RoundStartEquipmentValue () (value int ) {
169169 for _ , pl := range ts .Members () {
170170 value += pl .EquipmentValueRoundStart ()
171171 }
@@ -174,7 +174,7 @@ func (ts TeamState) RoundStartEquipmentValue() (value int) {
174174}
175175
176176// FreezeTimeEndEquipmentValue returns the cumulative value of all equipment owned by the members of the team at the end of the freeze-time of the current round.
177- func (ts TeamState ) FreezeTimeEndEquipmentValue () (value int ) {
177+ func (ts * TeamState ) FreezeTimeEndEquipmentValue () (value int ) {
178178 for _ , pl := range ts .Members () {
179179 value += pl .EquipmentValueFreezeTimeEnd ()
180180 }
@@ -183,7 +183,7 @@ func (ts TeamState) FreezeTimeEndEquipmentValue() (value int) {
183183}
184184
185185// MoneySpentThisRound returns the total amount of cash spent by the whole team in the current round.
186- func (ts TeamState ) MoneySpentThisRound () (value int ) {
186+ func (ts * TeamState ) MoneySpentThisRound () (value int ) {
187187 for _ , pl := range ts .Members () {
188188 value += pl .MoneySpentThisRound ()
189189 }
@@ -192,7 +192,7 @@ func (ts TeamState) MoneySpentThisRound() (value int) {
192192}
193193
194194// MoneySpentThisRound returns the total amount of cash spent by the whole team during the whole game up to the current point.
195- func (ts TeamState ) MoneySpentTotal () (value int ) {
195+ func (ts * TeamState ) MoneySpentTotal () (value int ) {
196196 for _ , pl := range ts .Members () {
197197 value += pl .MoneySpentTotal ()
198198 }
0 commit comments