Private
Public Access
1
0

fix game
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 8m20s

This commit is contained in:
Sebastian Unterschütz
2026-03-21 13:31:34 +01:00
parent 78742fc1c4
commit f48ade50bb
6 changed files with 130 additions and 83 deletions

View File

@@ -66,11 +66,19 @@ type LoginPayload struct {
// Input vom Spieler während des Spiels
type ClientInput struct {
Type string `json:"type"` // "JUMP", "START", "LEFT_DOWN", "RIGHT_DOWN", "SET_TEAM_NAME", etc.
Type string `json:"type"` // "STATE", "START", "SET_TEAM_NAME", etc.
RoomID string `json:"room_id"`
PlayerID string `json:"player_id"`
Sequence uint32 `json:"sequence"` // Sequenznummer für Client Prediction
TeamName string `json:"team_name,omitempty"` // Für SET_TEAM_NAME Input
// Vollständiger Input-State (für TYPE="STATE")
// Sendet den kompletten Zustand in einer Nachricht, verhindert stuck-Inputs durch Paketverlust
InputLeft bool `json:"input_left,omitempty"`
InputRight bool `json:"input_right,omitempty"`
InputJump bool `json:"input_jump,omitempty"`
InputDown bool `json:"input_down,omitempty"`
InputJoyX float64 `json:"input_joy_x,omitempty"`
}
type JoinRequest struct {