mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-07 11:13:53 +03:00
Simplify animation switching
This commit is contained in:
parent
31b49862ec
commit
a8dab89ce1
9 changed files with 47 additions and 187 deletions
|
@ -1058,10 +1058,7 @@ void LaraCheat(ITEM_INFO* item, COLL_INFO* coll)
|
|||
if (TestLaraWater(item) || (Lara.waterSurfaceDist > 0 && Lara.waterSurfaceDist != NO_HEIGHT))
|
||||
{
|
||||
Lara.waterStatus = LW_UNDERWATER;
|
||||
item->animNumber = LA_UNDERWATER_IDLE;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_UNDERWATER_STOP;
|
||||
item->goalAnimState = LS_UNDERWATER_STOP;
|
||||
SetAnimation(item, LA_UNDERWATER_IDLE);
|
||||
Lara.torsoYrot = 0;
|
||||
Lara.torsoXrot = 0;
|
||||
Lara.headYrot = 0;
|
||||
|
@ -1070,8 +1067,7 @@ void LaraCheat(ITEM_INFO* item, COLL_INFO* coll)
|
|||
else
|
||||
{
|
||||
Lara.waterStatus = LW_ABOVE_WATER;
|
||||
item->animNumber = LA_STAND_SOLID;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_STAND_SOLID);
|
||||
item->pos.zRot = 0;
|
||||
item->pos.xRot = 0;
|
||||
Lara.torsoYrot = 0;
|
||||
|
|
|
@ -196,10 +196,7 @@ void lara_as_run(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (TrInput & IN_ROLL)
|
||||
{
|
||||
item->animNumber = LA_ROLL_180_START;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase + 2;
|
||||
item->currentAnimState = LS_ROLL_FORWARD;
|
||||
item->goalAnimState = LS_STOP;
|
||||
SetAnimation(item, LA_ROLL_180_START, 2);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -392,10 +389,7 @@ void lara_as_stop(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (TrInput & IN_ROLL && Lara.waterStatus != LW_WADE)
|
||||
{
|
||||
item->animNumber = LA_ROLL_180_START;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase + 2;
|
||||
item->currentAnimState = LS_ROLL_FORWARD;
|
||||
item->goalAnimState = LS_STOP;
|
||||
SetAnimation(item, LA_ROLL_180_START, 2);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -730,13 +724,8 @@ void lara_col_fastback(ITEM_INFO* item, COLL_INFO* coll)
|
|||
else
|
||||
{
|
||||
item->fallspeed = 0;
|
||||
|
||||
item->animNumber = LA_FALL_BACK;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_FALL_BACK;
|
||||
item->goalAnimState = LS_FALL_BACK;
|
||||
|
||||
item->gravityStatus = true;
|
||||
SetAnimation(item, LA_FALL_BACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -810,11 +799,8 @@ void lara_col_turn_r(ITEM_INFO* item, COLL_INFO* coll)
|
|||
if (coll->Middle.Floor > 100 && !TestLaraSwamp(item))
|
||||
{
|
||||
item->fallspeed = 0;
|
||||
item->animNumber = LA_FALL_START;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_JUMP_FORWARD;
|
||||
item->goalAnimState = LS_JUMP_FORWARD;
|
||||
item->gravityStatus = true;
|
||||
SetAnimation(item, LA_FALL_START);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -947,23 +933,15 @@ void lara_col_fastfall(ITEM_INFO* item, COLL_INFO* coll)
|
|||
if (coll->Middle.Floor <= 0 || TestLaraSwamp(item))
|
||||
{
|
||||
if (LaraLandedBad(item, coll))
|
||||
{
|
||||
item->goalAnimState = LS_DEATH;
|
||||
}
|
||||
else
|
||||
{
|
||||
item->goalAnimState = LS_STOP;
|
||||
item->currentAnimState = LS_STOP;
|
||||
item->animNumber = LA_FREEFALL_LAND;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
}
|
||||
SetAnimation(item, LA_FREEFALL_LAND);
|
||||
|
||||
StopSoundEffect(SFX_TR4_LARA_FALL);
|
||||
|
||||
item->fallspeed = 0;
|
||||
item->gravityStatus = false;
|
||||
|
||||
|
||||
LaraSnapToHeight(item, coll);
|
||||
}
|
||||
}
|
||||
|
@ -1102,10 +1080,7 @@ void lara_col_compress(ITEM_INFO* item, COLL_INFO* coll)
|
|||
{
|
||||
if (coll->Middle.Ceiling > -100)
|
||||
{
|
||||
item->animNumber = LA_STAND_SOLID;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_STOP;
|
||||
item->currentAnimState = LS_STOP;
|
||||
SetAnimation(item, LA_STAND_SOLID);
|
||||
|
||||
item->speed = 0;
|
||||
item->fallspeed = 0;
|
||||
|
@ -1362,12 +1337,9 @@ void lara_col_roll2(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (coll->Middle.Floor > 200)
|
||||
{
|
||||
item->animNumber = LA_FALL_BACK;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_FALL_BACK;
|
||||
item->goalAnimState = LS_FALL_BACK;
|
||||
item->fallspeed = 0;
|
||||
item->gravityStatus = true;
|
||||
SetAnimation(item, LA_FALL_BACK);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,10 +82,7 @@ void LaraCheatyBits()
|
|||
if (Lara.waterStatus != LW_FLYCHEAT)
|
||||
{
|
||||
Lara.waterStatus = LW_FLYCHEAT;
|
||||
LaraItem->animNumber = LA_DOZY;
|
||||
LaraItem->frameNumber = g_Level.Anims[LaraItem->animNumber].frameBase;
|
||||
LaraItem->currentAnimState = LA_ONWATER_IDLE_TO_SWIM;
|
||||
LaraItem->goalAnimState = LA_ONWATER_IDLE_TO_SWIM;
|
||||
SetAnimation(LaraItem, LA_DOZY);
|
||||
LaraItem->gravityStatus = false;
|
||||
LaraItem->pos.xRot = ANGLE(30);
|
||||
LaraItem->fallspeed = 30;
|
||||
|
|
|
@ -104,9 +104,7 @@ void lara_col_climbdown(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (resultRight == -1 || resultLeft == -1)
|
||||
{
|
||||
item->animNumber = LA_LADDER_IDLE;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_LADDER_IDLE;
|
||||
SetAnimation(item, LA_LADDER_IDLE);
|
||||
item->goalAnimState = LS_HANG;
|
||||
|
||||
AnimateLara(item);
|
||||
|
@ -498,8 +496,7 @@ void LaraDoClimbLeftRight(ITEM_INFO* item, COLL_INFO* coll, int result, int shif
|
|||
|
||||
if (coll->Setup.OldAnimState != LS_LADDER_IDLE)
|
||||
{
|
||||
item->animNumber = LA_LADDER_IDLE;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_LADDER_IDLE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -537,19 +534,9 @@ void LaraDoClimbLeftRight(ITEM_INFO* item, COLL_INFO* coll, int result, int shif
|
|||
if (flag)
|
||||
{
|
||||
if (flag <= 0)
|
||||
{
|
||||
item->animNumber = LA_LADDER_LEFT_CORNER_INNER_START;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_SHIMMY_INNER_LEFT;
|
||||
item->currentAnimState = LS_SHIMMY_INNER_LEFT;
|
||||
}
|
||||
SetAnimation(item, LA_LADDER_LEFT_CORNER_INNER_START);
|
||||
else
|
||||
{
|
||||
item->animNumber = LA_LADDER_LEFT_CORNER_OUTER_START;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_SHIMMY_OUTER_LEFT;
|
||||
item->currentAnimState = LS_SHIMMY_OUTER_LEFT;
|
||||
}
|
||||
SetAnimation(item, LA_LADDER_LEFT_CORNER_OUTER_START);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -561,19 +548,9 @@ void LaraDoClimbLeftRight(ITEM_INFO* item, COLL_INFO* coll, int result, int shif
|
|||
if (flag)
|
||||
{
|
||||
if (flag <= 0)
|
||||
{
|
||||
item->animNumber = LA_LADDER_RIGHT_CORNER_INNER_START;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_SHIMMY_INNER_RIGHT;
|
||||
item->currentAnimState = LS_SHIMMY_INNER_RIGHT;
|
||||
}
|
||||
SetAnimation(item, LA_LADDER_RIGHT_CORNER_INNER_START);
|
||||
else
|
||||
{
|
||||
item->animNumber = LA_LADDER_RIGHT_CORNER_OUTER_START;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_SHIMMY_OUTER_RIGHT;
|
||||
item->currentAnimState = LS_SHIMMY_OUTER_RIGHT;
|
||||
}
|
||||
SetAnimation(item, LA_LADDER_RIGHT_CORNER_OUTER_START);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -997,10 +974,7 @@ int LaraCheckForLetGo(ITEM_INFO* item, COLL_INFO* coll)
|
|||
Lara.headYrot = 0;
|
||||
Lara.headXrot = 0;
|
||||
|
||||
item->goalAnimState = LS_JUMP_FORWARD;
|
||||
item->currentAnimState = LS_JUMP_FORWARD;
|
||||
item->animNumber = LA_FALL_START;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_FALL_START);
|
||||
|
||||
item->speed = 2;
|
||||
item->gravityStatus = true;
|
||||
|
|
|
@ -56,21 +56,11 @@ void LaraDeflectEdgeJump(ITEM_INFO* item, COLL_INFO* coll)
|
|||
if (coll->Middle.Floor <= 512)
|
||||
{
|
||||
if (coll->Middle.Floor <= 128)
|
||||
{
|
||||
item->goalAnimState = LS_GRAB_TO_FALL;
|
||||
item->currentAnimState = LS_GRAB_TO_FALL;
|
||||
|
||||
item->animNumber = LA_JUMP_UP_LAND;
|
||||
item->frameNumber = g_Level.Anims[LA_JUMP_UP_LAND].frameBase;
|
||||
}
|
||||
SetAnimation(item, LA_JUMP_UP_LAND);
|
||||
}
|
||||
else
|
||||
{
|
||||
item->goalAnimState = LS_FREEFALL;
|
||||
item->currentAnimState = LS_FREEFALL;
|
||||
|
||||
item->animNumber = LA_JUMP_WALL_SMASH_START;
|
||||
item->frameNumber = g_Level.Anims[LA_JUMP_WALL_SMASH_START].frameBase + 1;
|
||||
SetAnimation(item, LA_JUMP_WALL_SMASH_START, 1);
|
||||
}
|
||||
|
||||
item->speed /= 4;
|
||||
|
@ -140,11 +130,7 @@ bool LaraHitCeiling(ITEM_INFO* item, COLL_INFO* coll)
|
|||
item->pos.yPos = coll->Setup.OldPosition.y;
|
||||
item->pos.zPos = coll->Setup.OldPosition.z;
|
||||
|
||||
item->goalAnimState = LS_STOP;
|
||||
item->currentAnimState = LS_STOP;
|
||||
|
||||
item->animNumber = LA_STAND_SOLID;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_STAND_SOLID);
|
||||
|
||||
item->speed = 0;
|
||||
item->fallspeed = 0;
|
||||
|
@ -185,8 +171,7 @@ void LaraCollideStop(ITEM_INFO* item, COLL_INFO* coll)
|
|||
item->goalAnimState = LS_STOP;
|
||||
if (item->animNumber != LA_STAND_SOLID)
|
||||
{
|
||||
item->animNumber = LA_STAND_SOLID;
|
||||
item->frameNumber = g_Level.Anims[LA_STAND_SOLID].frameBase;
|
||||
SetAnimation(item, LA_STAND_SOLID);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -226,10 +226,8 @@ void lara_as_all4s(ITEM_INFO* item, COLL_INFO* coll)
|
|||
// TODO: fix ObjectOnLOS2
|
||||
/*if (ObjectOnLOS2(&s, &d, &v, (PHD_VECTOR*)&StaticMesh) == NO_LOS_ITEM)
|
||||
{*/
|
||||
item->animNumber = LA_CRAWL_JUMP_FLIP_DOWN;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_MISC_CONTROL;
|
||||
item->currentAnimState = LS_MISC_CONTROL;
|
||||
|
||||
SetAnimation(item, LA_CRAWL_JUMP_FLIP_DOWN);
|
||||
Lara.gunStatus = LG_HANDS_BUSY;
|
||||
/*}*/
|
||||
}
|
||||
|
@ -249,10 +247,7 @@ void lara_as_all4s(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (LOS(&s, &d) && item->animNumber != LA_CROUCH_TO_CRAWL_START && item->animNumber != LA_CROUCH_TO_CRAWL_CONTINUE && Lara.NewAnims.CrawlExit3click)
|
||||
{
|
||||
item->animNumber = LA_CRAWL_JUMP_DOWN_23CLICK;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_MISC_CONTROL;
|
||||
item->currentAnimState = LS_MISC_CONTROL;
|
||||
SetAnimation(item, LA_CRAWL_JUMP_DOWN_23CLICK);
|
||||
Lara.gunStatus = LG_HANDS_BUSY;
|
||||
|
||||
}
|
||||
|
@ -273,10 +268,7 @@ void lara_as_all4s(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (LOS(&s, &d) && item->animNumber != LA_CROUCH_TO_CRAWL_START && item->animNumber != LA_CROUCH_TO_CRAWL_CONTINUE && Lara.NewAnims.CrawlExit2click)
|
||||
{
|
||||
item->animNumber = LA_CRAWL_JUMP_DOWN_23CLICK;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_MISC_CONTROL;
|
||||
item->currentAnimState = LS_MISC_CONTROL;
|
||||
SetAnimation(item, LA_CRAWL_JUMP_DOWN_23CLICK);
|
||||
Lara.gunStatus = LG_HANDS_BUSY;
|
||||
|
||||
}
|
||||
|
@ -296,10 +288,7 @@ void lara_as_all4s(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (LOS(&s, &d) && item->animNumber != LA_CROUCH_TO_CRAWL_START && item->animNumber != LA_CROUCH_TO_CRAWL_CONTINUE && Lara.NewAnims.CrawlExit1click)
|
||||
{
|
||||
item->animNumber = LA_CRAWL_JUMP_DOWN_1CLICK;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_MISC_CONTROL;
|
||||
item->currentAnimState = LS_MISC_CONTROL;
|
||||
SetAnimation(item, LA_CRAWL_JUMP_DOWN_1CLICK);
|
||||
Lara.gunStatus = LG_HANDS_BUSY;
|
||||
|
||||
}
|
||||
|
@ -314,22 +303,15 @@ void lara_as_all4s(ITEM_INFO* item, COLL_INFO* coll)
|
|||
LaraCeilingFront(item, item->pos.yRot, 256, 256) <= -512 &&
|
||||
Lara.NewAnims.Crawl1clickup)
|
||||
{
|
||||
item->animNumber = LA_CRAWL_UP_STEP;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_MISC_CONTROL;
|
||||
item->currentAnimState = LS_MISC_CONTROL;
|
||||
SetAnimation(item, LA_CRAWL_UP_STEP);
|
||||
}
|
||||
else
|
||||
if (LaraFloorFront(item, item->pos.yRot, 256) == 256 &&
|
||||
else if (LaraFloorFront(item, item->pos.yRot, 256) == 256 &&
|
||||
LaraCeilingFront(item, item->pos.yRot, 256, 256) != NO_HEIGHT &&
|
||||
LaraCeilingFront(item, item->pos.yRot, 256, -256) <= -512 &&
|
||||
Lara.NewAnims.Crawl1clickdown)
|
||||
{
|
||||
item->animNumber = LA_CRAWL_DOWN_STEP;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_MISC_CONTROL;
|
||||
item->currentAnimState = LS_MISC_CONTROL;
|
||||
}
|
||||
{
|
||||
SetAnimation(item, LA_CRAWL_DOWN_STEP);
|
||||
}
|
||||
}
|
||||
|
||||
Lara.gunStatus = LG_HANDS_BUSY;
|
||||
|
@ -478,19 +460,9 @@ void lara_col_all4s(ITEM_INFO* item, COLL_INFO* coll)
|
|||
}
|
||||
}
|
||||
else if (TrInput & IN_LEFT)
|
||||
{
|
||||
item->animNumber = LA_CRAWL_TURN_LEFT;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_CRAWL_TURN_LEFT;
|
||||
item->goalAnimState = LS_CRAWL_TURN_LEFT;
|
||||
}
|
||||
SetAnimation(item, LA_CRAWL_TURN_LEFT);
|
||||
else if (TrInput & IN_RIGHT)
|
||||
{
|
||||
item->animNumber = LA_CRAWL_TURN_RIGHT;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_CRAWL_TURN_RIGHT;
|
||||
item->goalAnimState = LS_CRAWL_TURN_RIGHT;
|
||||
}
|
||||
SetAnimation(item, LA_CRAWL_TURN_RIGHT);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -574,8 +546,7 @@ void lara_col_crawl(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (item->animNumber != LA_CRAWL_IDLE)
|
||||
{
|
||||
item->animNumber = LA_CRAWL_IDLE;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_CRAWL_IDLE);
|
||||
}
|
||||
}
|
||||
else if (LaraFallen(item, coll))
|
||||
|
@ -717,8 +688,7 @@ void lara_col_crawlb(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (item->animNumber != LA_CRAWL_IDLE)
|
||||
{
|
||||
item->animNumber = LA_CRAWL_IDLE;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_CRAWL_IDLE);
|
||||
}
|
||||
}
|
||||
else if (LaraFallen(item, coll))
|
||||
|
@ -823,25 +793,18 @@ void lara_col_crawl2hang(ITEM_INFO* item, COLL_INFO* coll)
|
|||
Lara.headXrot = 0;
|
||||
Lara.torsoYrot = 0;
|
||||
Lara.torsoXrot = 0;
|
||||
item->animNumber = LA_JUMP_UP_TO_MONKEYSWING;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_MONKEYSWING_IDLE;
|
||||
item->goalAnimState = LS_MONKEYSWING_IDLE;
|
||||
SetAnimation(item, LA_JUMP_UP_TO_MONKEYSWING);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TestHangFeet(item, item->pos.yRot))
|
||||
{
|
||||
item->animNumber = LA_REACH_TO_HANG;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_HANG;
|
||||
SetAnimation(item, LA_REACH_TO_HANG);
|
||||
item->goalAnimState = LS_HANG_FEET;
|
||||
}
|
||||
else
|
||||
{
|
||||
item->animNumber = LA_REACH_TO_HANG;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_HANG;
|
||||
SetAnimation(item, LA_REACH_TO_HANG);
|
||||
item->goalAnimState = LS_HANG;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,10 +145,7 @@ void lara_col_hang(ITEM_INFO* item, COLL_INFO* coll)
|
|||
}
|
||||
else if (TestLastFrame(item))
|
||||
{
|
||||
item->animNumber = LA_LADDER_SHIMMY_UP;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_HANG;
|
||||
item->currentAnimState = LS_HANG;
|
||||
SetAnimation(item, LA_LADDER_SHIMMY_UP);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,10 +163,7 @@ void lara_col_hang(ITEM_INFO* item, COLL_INFO* coll)
|
|||
}
|
||||
else if (TestLastFrame(item))
|
||||
{
|
||||
item->animNumber = LA_LADDER_SHIMMY_DOWN;
|
||||
item->goalAnimState = LS_HANG;
|
||||
item->currentAnimState = LS_HANG;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_LADDER_SHIMMY_DOWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -414,10 +408,7 @@ void lara_col_hang_feet(ITEM_INFO* item, COLL_INFO* coll)
|
|||
}
|
||||
else
|
||||
{
|
||||
item->animNumber = LA_LADDER_SHIMMY_UP;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->goalAnimState = LS_HANG;
|
||||
item->currentAnimState = LS_HANG;
|
||||
SetAnimation(item, LA_LADDER_SHIMMY_UP);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,19 +140,13 @@ void InitialiseLaraAnims(ITEM_INFO* item)
|
|||
if (TestLaraWater(item))
|
||||
{
|
||||
Lara.waterStatus = LW_UNDERWATER;
|
||||
item->goalAnimState = LS_UNDERWATER_STOP;
|
||||
item->currentAnimState = LS_UNDERWATER_STOP;
|
||||
item->fallspeed = 0;
|
||||
item->animNumber = LA_UNDERWATER_IDLE;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_UNDERWATER_IDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
Lara.waterStatus = LW_ABOVE_WATER;
|
||||
item->goalAnimState = LS_STOP;
|
||||
item->currentAnimState = LS_STOP;
|
||||
item->animNumber = LA_STAND_SOLID;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_STAND_SOLID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -222,10 +222,7 @@ void lara_col_monkeyswing(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
if (!monkeyFront || coll->CollisionType == CT_FRONT || abs(coll->Middle.Ceiling - coll->Front.Ceiling) > 50)
|
||||
{
|
||||
item->animNumber = LA_MONKEYSWING_IDLE;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
item->currentAnimState = LS_MONKEYSWING_IDLE;
|
||||
item->goalAnimState = LS_MONKEYSWING_IDLE;
|
||||
SetAnimation(item, LA_MONKEYSWING_IDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -293,10 +290,7 @@ void lara_col_monkeyr(ITEM_INFO* item, COLL_INFO* coll)
|
|||
}
|
||||
else
|
||||
{
|
||||
item->animNumber = LA_MONKEYSWING_IDLE;
|
||||
item->currentAnimState = LS_MONKEYSWING_IDLE;
|
||||
item->goalAnimState = LS_MONKEYSWING_IDLE;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_MONKEYSWING_IDLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -346,10 +340,7 @@ void lara_col_monkeyl(ITEM_INFO* item, COLL_INFO* coll)
|
|||
}
|
||||
else
|
||||
{
|
||||
item->animNumber = LA_MONKEYSWING_IDLE;
|
||||
item->currentAnimState = LS_MONKEYSWING_IDLE;
|
||||
item->goalAnimState = LS_MONKEYSWING_IDLE;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
SetAnimation(item, LA_MONKEYSWING_IDLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -535,10 +526,7 @@ void MonkeySwingFall(ITEM_INFO* item)
|
|||
{
|
||||
if (item->currentAnimState != LS_MONKEYSWING_TURN_180)
|
||||
{
|
||||
item->goalAnimState = LS_JUMP_UP;
|
||||
item->currentAnimState = LS_JUMP_UP;
|
||||
item->animNumber = LA_JUMP_UP;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase + 9;
|
||||
SetAnimation(item, LA_JUMP_UP, 9);
|
||||
|
||||
item->speed = 2;
|
||||
item->gravityStatus = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue