From 0164f9c6879ab366db314e545c9785b59cd043a3 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Sun, 12 May 2013 16:21:42 -0500 Subject: Shy Guy sprite collision fix, seems to work --- src/shyguy.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/shyguy.cpp b/src/shyguy.cpp index 23a81f3..c30690a 100644 --- a/src/shyguy.cpp +++ b/src/shyguy.cpp @@ -216,7 +216,9 @@ daShyGuy *daShyGuy::build() { void daShyGuy::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) { if (acState.getCurrentState() == &StateID_RealWalk) { - pos.x = direction ? pos.x + 1.5 : pos.x - 1.5; + + pos.x = ((pos.x - ((dEn_c*)apOther->owner)->pos.x) > 0) ? pos.x + 1.5 : pos.x - 1.5; + // pos.x = direction ? pos.x + 1.5 : pos.x - 1.5; doStateChange(&StateID_RealTurn); } if (acState.getCurrentState() == &StateID_FireKnockBack) { -- cgit v1.2.3