Private
Public Access
1
0

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

This commit is contained in:
Sebastian Unterschütz
2026-03-22 10:44:58 +01:00
parent 1dc5005cf3
commit aff505773a
12 changed files with 693 additions and 16 deletions

View File

@@ -45,10 +45,11 @@ func (g *Game) ApplyInput(input InputState) {
ActiveChunks: g.gameState.WorldChunks,
MovingPlatforms: g.gameState.MovingPlatforms,
}
difficultyFactor := g.gameState.DifficultyFactor
g.stateMutex.Unlock()
// Gemeinsame Physik anwenden (1:1 wie Server)
physics.ApplyPhysics(&state, physicsInput, g.currentSpeed, collisionChecker, physics.DefaultPlayerConstants())
// Gemeinsame Physik anwenden (1:1 wie Server, inkl. Schwierigkeits-Skalierung)
physics.ApplyPhysics(&state, physicsInput, g.currentSpeed, difficultyFactor, collisionChecker, physics.DefaultPlayerConstants())
// Ergebnis zurückschreiben
g.predictedX = state.X