From f9ff9d1db20151f0b4de975d0d99f2817f244d96 Mon Sep 17 00:00:00 2001 From: nek0 Date: Wed, 20 Jan 2021 05:20:56 +0100 Subject: [PATCH] zero allmovement in collision direction --- src/Types/Player.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Types/Player.hs b/src/Types/Player.hs index 31a2521..21ec06d 100644 --- a/src/Types/Player.hs +++ b/src/Types/Player.hs @@ -162,5 +162,13 @@ instance Collidible Pituicat where if dirx /= 0 then V2 0 1 else V2 1 1 + , pcTMoveVel = pcTMoveVel ncat * + if dirx /= 0 + then V2 0 1 + else V2 1 1 + , pcVel = pcVel ncat * + if dirx /= 0 + then V2 0 1 + else V2 1 1 } )