Skip to content

Commit 4ed45f2

Browse files
committed
v5ify
1 parent a54dff2 commit 4ed45f2

18 files changed

+1340
-2587
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For business inquiries please use the contact information found on the [GitHub p
2323

2424
go get -u github.com/markus-wa/demoinfocs-golang/v5/pkg/demoinfocs
2525

26-
See [v5 branch with broadcast example](https://github.com/markus-wa/demoinfocs-golang/tree/v5/examples/broadcasts)
26+
See [broadcast example for live CSTV+ parsing](https://github.com/markus-wa/demoinfocs-golang/tree/master/examples/broadcasts)
2727

2828
### CS:GO
2929

examples/viewmodel-settings/viewmodel_settings.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"os"
66

7-
ex "github.com/markus-wa/demoinfocs-golang/v4/examples"
8-
demoinfocs "github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs"
9-
events "github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs/events"
7+
ex "github.com/markus-wa/demoinfocs-golang/v5/examples"
8+
demoinfocs "github.com/markus-wa/demoinfocs-golang/v5/pkg/demoinfocs"
9+
events "github.com/markus-wa/demoinfocs-golang/v5/pkg/demoinfocs/events"
1010
)
1111

1212
// Run like this: go run viewmodel_settings.go -demo /path/to/cs2-demo.dem

pkg/demoinfocs/common/player.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,6 @@ func (p *Player) CrosshairCode() string {
452452
// ViewmodelOffset returns the player's viewmodel offset as a 3D vector (X, Y, Z).
453453
// Returns zero vector if not available (CS:GO demos or player not alive).
454454
func (p *Player) ViewmodelOffset() r3.Vector {
455-
if !p.demoInfoProvider.IsSource2() {
456-
return r3.Vector{}
457-
}
458-
459455
pawn := p.PlayerPawnEntity()
460456
if pawn == nil {
461457
return r3.Vector{}
@@ -471,10 +467,6 @@ func (p *Player) ViewmodelOffset() r3.Vector {
471467
// ViewmodelFOV returns the player's viewmodel field of view.
472468
// Returns 0 if not available (CS:GO demos or player not alive).
473469
func (p *Player) ViewmodelFOV() float32 {
474-
if !p.demoInfoProvider.IsSource2() {
475-
return 0
476-
}
477-
478470
pawn := p.PlayerPawnEntity()
479471
if pawn == nil {
480472
return 0

0 commit comments

Comments
 (0)