summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2013-05-12 16:21:42 -0500
committerColin Noga <Tempus@chronometry.ca>2013-05-12 16:23:15 -0500
commit0164f9c6879ab366db314e545c9785b59cd043a3 (patch)
tree0a99a2c9c9ef5fdf419b93e455f3a21ecdce33a7 /src
parentc0c4b515e7fcda65f6451af33a0de4275068114b (diff)
downloadkamek-0164f9c6879ab366db314e545c9785b59cd043a3.tar.gz
kamek-0164f9c6879ab366db314e545c9785b59cd043a3.zip
Shy Guy sprite collision fix, seems to work
Diffstat (limited to 'src')
-rw-r--r--src/shyguy.cpp4
1 files changed, 3 insertions, 1 deletions
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) {