Skip to content

Commit b8fd000

Browse files
committed
deprecate Player.Velocity & Player.PreviousFramePosition
1 parent b4f2dd8 commit b8fd000

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/demoinfocs/common/player.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type Player struct {
3333
IsPlanting bool
3434
IsReloading bool
3535
IsUnknown bool // Used to identify unknown/broken players. see https://github.com/markus-wa/demoinfocs-golang/issues/162
36-
PreviousFramePosition r3.Vector // CS2 only, used to compute velocity as it's not networked in CS2 demos
36+
PreviousFramePosition r3.Vector // Deprecated: may be removed in v5 due to performance concerns, track this yourself.
3737
}
3838

3939
func (p *Player) PlayerPawnEntity() st.Entity {
@@ -537,6 +537,7 @@ func (p *Player) PositionEyes() r3.Vector {
537537
}
538538

539539
// Velocity returns the player's velocity.
540+
// Deprecated: will be removed due to performance concerns, you will need to track this yourself.
540541
func (p *Player) Velocity() r3.Vector {
541542
if p.demoInfoProvider.IsSource2() {
542543
t := 64.0

0 commit comments

Comments
 (0)