mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-01 09:18:00 +03:00
Don't pass anim number to TestLastFrame if not needed
This commit is contained in:
parent
44f1c1e40e
commit
3b725736e7
3 changed files with 5 additions and 5 deletions
|
@ -93,7 +93,7 @@ void lara_col_hang(ITEM_INFO* item, COLL_INFO* coll)
|
|||
|
||||
TestLaraHang(item, coll);
|
||||
|
||||
if (TestLastFrame(item, LA_REACH_TO_HANG))
|
||||
if (item->animNumber == LA_REACH_TO_HANG)
|
||||
{
|
||||
TestForObjectOnLedge(item, coll);
|
||||
|
||||
|
@ -149,7 +149,7 @@ void lara_col_hang(ITEM_INFO* item, COLL_INFO* coll)
|
|||
{
|
||||
item->goalAnimState = LS_LADDER_IDLE;
|
||||
}
|
||||
else
|
||||
else if (TestLastFrame(item))
|
||||
{
|
||||
item->animNumber = LA_LADDER_SHIMMY_UP;
|
||||
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
|
||||
|
@ -170,7 +170,7 @@ void lara_col_hang(ITEM_INFO* item, COLL_INFO* coll)
|
|||
{
|
||||
item->goalAnimState = LS_LADDER_IDLE;
|
||||
}
|
||||
else
|
||||
else if (TestLastFrame(item))
|
||||
{
|
||||
item->animNumber = LA_LADDER_SHIMMY_DOWN;
|
||||
item->goalAnimState = LS_HANG;
|
||||
|
|
|
@ -323,7 +323,7 @@ void ClampRotation(PHD_3DPOS* pos, short angle, short rot)
|
|||
|
||||
bool TestLastFrame(ITEM_INFO* item, short animNumber)
|
||||
{
|
||||
if (item->animNumber != animNumber)
|
||||
if ((animNumber >= 0) && (item->animNumber != animNumber))
|
||||
return false;
|
||||
|
||||
ANIM_STRUCT* anim = &g_Level.Anims[item->animNumber];
|
||||
|
|
|
@ -62,7 +62,7 @@ BOUNDING_BOX* GetBoundsAccurate(ITEM_INFO* item);
|
|||
void GetLaraJointPosition(PHD_VECTOR* pos, int LM_enum);
|
||||
void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint);
|
||||
void ClampRotation(PHD_3DPOS* pos, short angle, short rot);
|
||||
bool TestLastFrame(ITEM_INFO* item, short animNumber);
|
||||
bool TestLastFrame(ITEM_INFO* item, short animNumber = -1);
|
||||
|
||||
void DrawAnimatingItem(ITEM_INFO* item);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue