Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gameplay improvements #3

Merged
merged 3 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
13 changes: 9 additions & 4 deletions game/packet/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ var ServerMessageTable = common.NewMessageTable(map[uint16]ServerMessage{
0x016A: &Server016A{},
0x016C: &ServerLockerCombinationResponse{},
0x0170: &ServerLockerInventoryResponse{},
0x0199: &ServerRoomPlayerFinished{},
0x01F6: &Server01F6{},
0x020E: &Server020E{},
0x0210: &ServerInboxNotify{},
Expand Down Expand Up @@ -498,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 Expand Up @@ -634,6 +635,10 @@ type ServerLockerInventoryResponse struct {
Status uint32
}

type ServerRoomPlayerFinished struct {
ServerMessage_
}

// ServerRoomJoin is sent when a room is joined.
type ServerRoomJoin struct {
ServerMessage_
Expand Down
Loading