From 509b84b4f1594c3eb47cae7dec075d2e6573a1d8 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Fri, 29 Jun 2012 00:50:52 +0100 Subject: [PATCH] Stop STKM being able to jump on the bottom of the screen --- src/elements/stkm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/elements/stkm.c b/src/elements/stkm.c index c1b3d6b03..a72f83917 100644 --- a/src/elements/stkm.c +++ b/src/elements/stkm.c @@ -156,7 +156,7 @@ int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { { if (dl>dr) { - if (!eval_move(t, playerp->legs[4], playerp->legs[5], NULL)) + if (INBOND(playerp->legs[4], playerp->legs[5]) && !eval_move(t, playerp->legs[4], playerp->legs[5], NULL)) { playerp->accs[2] = -3*gvy-3*gvx; playerp->accs[3] = 3*gvx-3*gvy; @@ -166,7 +166,7 @@ int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { } else { - if (!eval_move(t, playerp->legs[12], playerp->legs[13], NULL)) + if (INBOND(playerp->legs[12], playerp->legs[13]) && !eval_move(t, playerp->legs[12], playerp->legs[13], NULL)) { playerp->accs[6] = -3*gvy-3*gvx; playerp->accs[7] = 3*gvx-3*gvy; @@ -181,7 +181,7 @@ int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { { if (dllegs[4], playerp->legs[5], NULL)) + if (INBOND(playerp->legs[4], playerp->legs[5]) && !eval_move(t, playerp->legs[4], playerp->legs[5], NULL)) { playerp->accs[2] = 3*gvy-3*gvx; playerp->accs[3] = -3*gvx-3*gvy; @@ -191,7 +191,7 @@ int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { } else { - if (!eval_move(t, playerp->legs[12], playerp->legs[13], NULL)) + if (INBOND(playerp->legs[12], playerp->legs[13]) && !eval_move(t, playerp->legs[12], playerp->legs[13], NULL)) { playerp->accs[6] = 3*gvy-3*gvx; playerp->accs[7] = -3*gvx-3*gvy; @@ -203,7 +203,8 @@ int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { //Jump if (((int)(playerp->comm)&0x04) == 0x04 && - (!eval_move(t, playerp->legs[4], playerp->legs[5], NULL) || !eval_move(t, playerp->legs[12], playerp->legs[13], NULL))) + ((INBOND(playerp->legs[4], playerp->legs[5]) && !eval_move(t, playerp->legs[4], playerp->legs[5], NULL)) + || (INBOND(playerp->legs[12], playerp->legs[13]) && !eval_move(t, playerp->legs[12], playerp->legs[13], NULL)))) { parts[i].vy -= 4*gvy; playerp->accs[3] -= gvy;