Coco-Ast-Trigger auf nicht-solide Bit-8-Tiles beschraenkt (Standard-Boden ctype 40 enthaelt Bit 8 -- kein Festhalten an Waenden)

This commit is contained in:
2026-07-26 12:06:40 +02:00
parent 892d08f316
commit be1a77d95f
+5 -2
View File
@@ -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: