修复小推车触发bug

This commit is contained in:
星外之神 2022-08-02 19:41:14 +08:00
parent fde1661ec5
commit 9801133724
2 changed files with 2 additions and 3 deletions

View File

@ -365,7 +365,7 @@ LITTLE_GAME_MAP_DATA = (
c.CHOOSEBAR_TYPE: c.CHOOSEBAR_BOWLING,
c.SHOVEL: 0,
c.SPAWN_ZOMBIES:c.SPAWN_ZOMBIES_AUTO,
c.INCLUDED_ZOMBIES: ( c.SCREEN_DOOR_ZOMBIE,),
c.INCLUDED_ZOMBIES: ( c.POLE_VAULTING_ZOMBIE,),
c.NUM_FLAGS:3,
c.CARD_POOL: { c.WALLNUTBOWLING: 0,
c.REDWALLNUTBOWLING: 0,

View File

@ -1196,7 +1196,7 @@ class Level(tool.State):
and (pg.sprite.collide_mask(zombie, self.cars[i]))):
self.cars[i].setWalk()
if (pg.sprite.collide_mask(zombie, self.cars[i]) or
self.cars[i].rect.x <= zombie.rect.centerx <= self.cars[i].rect.right):
self.cars[i].rect.x <= zombie.rect.right <= self.cars[i].rect.right):
zombie.health = 0
if self.cars[i].dead:
self.cars[i] = None
@ -1417,7 +1417,6 @@ class Level(tool.State):
for i in range(self.map_y_len):
for zombie in self.zombie_groups[i]:
if zombie.rect.right < -20 and (not zombie.losthead) and (zombie.state != c.DIE):
print(zombie.rect.right, zombie.losthead, zombie.state,zombie.name)
return True
return False