From 4ce50556a3e8845d55f024366c0ab95642afba8e Mon Sep 17 00:00:00 2001 From: XProger Date: Sat, 13 May 2017 20:36:08 +0300 Subject: [PATCH 1/2] #49 fix --- src/lara.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lara.h b/src/lara.h index 62c4e9f..153eeab 100644 --- a/src/lara.h +++ b/src/lara.h @@ -1523,7 +1523,7 @@ struct Lara : Character { int h = (int)pos.y - floor; int aIndex = animation.index; - if (floor == ceiling) + if (floor == ceiling || h < 256) ;// do nothing else if (h <= 2 * 256 + 128) { aIndex = ANIM_CLIMB_2; @@ -2136,6 +2136,9 @@ struct Lara : Character { if (collision.side == Collision::FRONT) { int floor = collision.info[Collision::FRONT].floor; + if (state == STATE_STEP_LEFT || state == STATE_STEP_RIGHT) + collision.side = Collision::NONE; + // hit the wall switch (stand) { case STAND_AIR : From cd29100d6a17955f0fe8bf411edc1c55164e9ba7 Mon Sep 17 00:00:00 2001 From: XProger Date: Sat, 13 May 2017 21:06:29 +0300 Subject: [PATCH 2/2] #47 fix --- src/lara.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lara.h b/src/lara.h index 153eeab..5c9bfac 100644 --- a/src/lara.h +++ b/src/lara.h @@ -2136,7 +2136,7 @@ struct Lara : Character { if (collision.side == Collision::FRONT) { int floor = collision.info[Collision::FRONT].floor; - if (state == STATE_STEP_LEFT || state == STATE_STEP_RIGHT) + if (velocity.dot(getDir()) <= EPS) collision.side = Collision::NONE; // hit the wall @@ -2155,7 +2155,7 @@ struct Lara : Character { break; case STAND_GROUND : case STAND_HANG : - if (stand == STAND_GROUND && (pos - opos).length2() < 16) + if (stand == STAND_GROUND && state != STATE_ROLL_1 && state != STATE_ROLL_2 && (pos - opos).length2() < 16) animation.setAnim(ANIM_STAND_NORMAL); else if (opos.y - floor > (256 * 3 - 128) && state == STATE_RUN) animation.setAnim(isLeftFoot ? ANIM_SMASH_RUN_LEFT : ANIM_SMASH_RUN_RIGHT);