From be1a77d95f7d7f36c2cc6796a9e925b4326b1b5c Mon Sep 17 00:00:00 2001 From: duffyduck Date: Sun, 26 Jul 2026 12:06:40 +0200 Subject: [PATCH] Coco-Ast-Trigger auf nicht-solide Bit-8-Tiles beschraenkt (Standard-Boden ctype 40 enthaelt Bit 8 -- kein Festhalten an Waenden) --- game/level.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/game/level.py b/game/level.py index 123da4f..2485c81 100644 --- a/game/level.py +++ b/game/level.py @@ -446,12 +446,15 @@ class Player: # auf Kopfhoehe -- endgueltige Verifikation per DOSBox steht aus). head_ty = int((self.y - self.HITBOX_H) // TILE) tx = int(self.x // TILE) + head_ct = level.ctype(tx, head_ty) if (self.can_hang and not self.hanging and not self.on_ground - and keys[pygame.K_UP] and level.ctype(tx, head_ty) & 8): + and keys[pygame.K_UP] + and head_ct & 8 and not head_ct & SOLID_BIT): self.hanging = True self.y = head_ty * TILE + TILE + self.HITBOX_H - 0.01 if self.hanging: - if (not level.ctype(tx, head_ty) & 8 or keys[pygame.K_DOWN] + hc = level.ctype(tx, head_ty) + if (not (hc & 8 and not hc & SOLID_BIT) or keys[pygame.K_DOWN] or self.on_ground): self.hanging = False else: