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:
+5
-2
@@ -446,12 +446,15 @@ class Player:
|
|||||||
# auf Kopfhoehe -- endgueltige Verifikation per DOSBox steht aus).
|
# auf Kopfhoehe -- endgueltige Verifikation per DOSBox steht aus).
|
||||||
head_ty = int((self.y - self.HITBOX_H) // TILE)
|
head_ty = int((self.y - self.HITBOX_H) // TILE)
|
||||||
tx = int(self.x // 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
|
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.hanging = True
|
||||||
self.y = head_ty * TILE + TILE + self.HITBOX_H - 0.01
|
self.y = head_ty * TILE + TILE + self.HITBOX_H - 0.01
|
||||||
if self.hanging:
|
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):
|
or self.on_ground):
|
||||||
self.hanging = False
|
self.hanging = False
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user