1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-11 15:45:05 +02:00
This commit is contained in:
XProger
2019-01-13 05:12:56 +03:00
parent 04e6bf198d
commit 9946d28875

View File

@@ -2453,14 +2453,14 @@ struct Lara : Character {
}
bool checkClimb() {
if ((input & (FORTH | ACTION)) == (FORTH | ACTION) && (animation.index == ANIM_STAND || animation.index == ANIM_STAND_NORMAL) && emptyHands() && collision.side == Collision::FRONT) { // TODO: get rid of animation.index
if ((input & (FORTH | ACTION)) == (FORTH | ACTION) && !(input & (LEFT | RIGHT)) && (animation.index == ANIM_STAND || animation.index == ANIM_STAND_NORMAL) && emptyHands() && collision.side == Collision::FRONT) { // TODO: get rid of animation.index
float floor = collision.info[Collision::FRONT].floor;
float ceiling = collision.info[Collision::FRONT].ceiling;
float h = pos.y - floor;
int aIndex = animation.index;
if (floor == ceiling || h < 256)
if (floor - ceiling < 768 || h < 256)
;// do nothing
else if (h <= 2 * 256 + 128) {
aIndex = ANIM_CLIMB_2;