Skip to content

Commit

Permalink
Implement hole and player orders mostly correctly.
Browse files Browse the repository at this point in the history
Player order is still wrong because we are not tracking OB/etc.
  • Loading branch information
jchv committed Jul 4, 2023
1 parent 7dd0b6d commit ab59b2f
Show file tree
Hide file tree
Showing 3 changed files with 251 additions and 142 deletions.
18 changes: 11 additions & 7 deletions game/model/room.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ type RoomState struct {

GamePhase GamePhase
ShotSync *ShotSyncData
HoleInfo *HoleInfo
Holes []RoomHole
ActiveConnID uint32
}

Expand Down Expand Up @@ -170,10 +170,14 @@ type ShotSyncData struct {
Unknown2 [11]byte
}

type HoleInfo struct {
Par uint8
TeeX float32
TeeZ float32
PinX float32
PinZ float32
type RoomHole struct {
Course byte
HoleNum uint8
HoleID uint32
Pin uint8
Par uint8
TeeX float32
TeeZ float32
PinX float32
PinZ float32
}
8 changes: 4 additions & 4 deletions game/packet/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,10 @@ type Server004E struct {
}

type HoleInfo struct {
HoleID uint32
Pin uint8
Course uint8
Num uint8
HoleID uint32
Pin uint8
Course uint8
HoleNum uint8
}

type ServerRoomGameData struct {
Expand Down
Loading

0 comments on commit ab59b2f

Please sign in to comment.