Fixed water transition

This commit is contained in:
theo@manjaro 2021-11-18 18:03:34 +01:00
parent 03db91acd0
commit 4e5f12b967

View File

@ -77,11 +77,11 @@ class Player(Movable):
if not self.hitpose:
if self.water and self.rect.y>self.water.rect.y: # Reverse gravity underwater
if self.water and self.rect.center[1]>self.water.rect.y: # Reverse gravity underwater
if self.gravityway == 1:
self.gravityway = -1
# Décellerer
self.verspd *= 0.9
self.verspd *= 0.85
# Spawn splash particles
self.game.addParticle(self.splashparticles,self.rect.left-5,self.water.rect.top-5,fps=12)
self.game.addParticle(self.splashparticles,self.rect.right+5,self.water.rect.top-5,flipx=True,fps=12)
@ -89,7 +89,7 @@ class Player(Movable):
if self.gravityway == -1:
self.gravityway = 1
# Décellerer
self.verspd *= 0.9
self.verspd *= 0.85
# Spawn splash particles
self.game.addParticle(self.splashparticles,self.rect.left-5,self.water.rect.top-5,fps=12)
self.game.addParticle(self.splashparticles,self.rect.right+5,self.water.rect.top-5,flipx=True,fps=12)