mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-06 19:01:06 +03:00
Fix ancient turn lock against walls
This commit is contained in:
parent
446b99d571
commit
20918f2c96
2 changed files with 20 additions and 3 deletions
|
@ -916,7 +916,7 @@ void LaraAboveWater(ITEM_INFO* item, COLL_INFO* coll)
|
|||
info->turnRate = 0;
|
||||
item->pos.yRot += info->turnRate;
|
||||
|
||||
// Animate info->
|
||||
// Animate Lara.
|
||||
AnimateLara(item);
|
||||
|
||||
if (info->ExtraAnim == -1)
|
||||
|
|
|
@ -183,9 +183,26 @@ void LaraCollideStop(ITEM_INFO* item, COLL_INFO* coll)
|
|||
item->frameNumber = coll->Setup.OldFrameNumber;
|
||||
|
||||
if (TrInput & IN_LEFT)
|
||||
item->goalAnimState = LS_TURN_LEFT_SLOW;
|
||||
{
|
||||
// Prevent turn lock against walls.
|
||||
if (item->currentAnimState == LS_TURN_RIGHT_SLOW ||
|
||||
item->currentAnimState == LS_TURN_RIGHT_FAST)
|
||||
{
|
||||
item->goalAnimState = LS_IDLE;
|
||||
}
|
||||
else
|
||||
item->goalAnimState = LS_TURN_LEFT_SLOW;
|
||||
}
|
||||
else if (TrInput & IN_RIGHT)
|
||||
item->goalAnimState = LS_TURN_RIGHT_SLOW;
|
||||
{
|
||||
if (item->currentAnimState == LS_TURN_LEFT_SLOW ||
|
||||
item->currentAnimState == LS_TURN_LEFT_FAST)
|
||||
{
|
||||
item->goalAnimState = LS_IDLE;
|
||||
}
|
||||
else
|
||||
item->goalAnimState = LS_TURN_RIGHT_SLOW;
|
||||
}
|
||||
else
|
||||
item->goalAnimState = LS_IDLE;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue