1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-18 10:51:23 +02:00

Merge remote-tracking branch 'refs/remotes/XProger/master'

This commit is contained in:
Gh0stBlade
2017-05-13 20:11:45 +01:00

View File

@@ -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 (velocity.dot(getDir()) <= EPS)
collision.side = Collision::NONE;
// hit the wall
switch (stand) {
case STAND_AIR :
@@ -2152,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);