Private
Public Access
1
0

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

This commit is contained in:
Sebastian Unterschütz
2026-03-22 17:26:18 +01:00
parent 9330405571
commit 0aa81a2edc

View File

@@ -509,9 +509,8 @@ func (g *Game) DrawGame(screen *ebiten.Image) {
text.Draw(screen, msg, basicfont.Face7x13, canvasW/2-40, canvasH/2, color.RGBA{255, 255, 0, 255})
} else if g.gameState.Status == "RUNNING" {
// Danger-Overlay: Ab DifficultyFactor > 0.5 rötlicher Bildschirmrand
g.stateMutex.Lock()
// stateMutex ist bereits seit Zeile 388 per defer gehalten kein erneuter Lock!
df := g.gameState.DifficultyFactor
g.stateMutex.Unlock()
if df > 0.5 {
// Alpha von 0 (bei df=0.5) bis 60 (bei df=1.0)
dangerAlpha := uint8((df - 0.5) * 2.0 * 60)