mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-02 17:57:59 +03:00
Fix corner shimmy; fix immobile UPV; cleanup
This commit is contained in:
parent
0538d8f13b
commit
758b8d34c2
4 changed files with 9 additions and 7 deletions
|
@ -829,11 +829,11 @@ void LaraAboveWater(ITEM_INFO* item, CollisionInfo* coll)
|
|||
static bool dbU = false;
|
||||
if (doRoutines || KeyMap[DIK_U] && !dbU)
|
||||
{
|
||||
// Handle current Lara status.
|
||||
lara_control_routines[item->Animation.ActiveState](item, coll);
|
||||
HandleLaraMovementParameters(item, coll);
|
||||
|
||||
// Animate Lara.
|
||||
// Handle current Lara status.
|
||||
lara_control_routines[item->Animation.ActiveState](item, coll);
|
||||
|
||||
AnimateLara(item);
|
||||
|
||||
if (lara->ExtraAnim == -1)
|
||||
|
|
|
@ -642,7 +642,7 @@ void SetLaraSlideAnimation(ITEM_INFO* item, CollisionInfo* coll)
|
|||
// Slide backward.
|
||||
else
|
||||
{
|
||||
if (item->Animation.ActiveState == LS_SLIDE_BACK && abs(short(deltaAngle - ANGLE(180.0f))) <= -ANGLE(180.0f))
|
||||
if (item->Animation.ActiveState == LS_SLIDE_BACK && abs((short)(deltaAngle - ANGLE(180.0f))) <= -ANGLE(180.0f))
|
||||
return;
|
||||
|
||||
SetAnimation(item, LA_SLIDE_BACK_START);
|
||||
|
|
|
@ -839,7 +839,7 @@ bool LaraPositionOnLOS(ITEM_INFO* item, short angle, int distance)
|
|||
auto result1 = LOS(&start1, &end1);
|
||||
auto result2 = LOS(&start2, &end2);
|
||||
|
||||
return (!result1 && !result2);
|
||||
return (result1 && result2);
|
||||
}
|
||||
|
||||
int LaraFloorFront(ITEM_INFO* item, short angle, int distance)
|
||||
|
|
|
@ -404,8 +404,8 @@ static void DoCurrent(ITEM_INFO* laraItem, ITEM_INFO* UPVItem)
|
|||
int dz = target.z - laraItem->Position.zPos;
|
||||
|
||||
int velocity = g_Level.Sinks[sinkVal].strength;
|
||||
dx = phd_sin(angle * 16) * velocity * 1024;
|
||||
dz = phd_cos(angle * 16) * velocity * 1024;
|
||||
dx = phd_sin(angle * 16) * velocity * SECTOR(1);
|
||||
dz = phd_cos(angle * 16) * velocity * SECTOR(1);
|
||||
|
||||
lara->WaterCurrentPull.x += ((dx - lara->WaterCurrentPull.x) / 16);
|
||||
lara->WaterCurrentPull.z += ((dz - lara->WaterCurrentPull.z) / 16);
|
||||
|
@ -425,6 +425,7 @@ static void BackgroundCollision(ITEM_INFO* laraItem, ITEM_INFO* UPVItem)
|
|||
coll->Setup.LowerFloorBound = NO_LOWER_BOUND;
|
||||
coll->Setup.UpperFloorBound = -UPV_HEIGHT;
|
||||
coll->Setup.LowerCeilingBound = UPV_HEIGHT;
|
||||
coll->Setup.UpperCeilingBound = MAX_HEIGHT;
|
||||
coll->Setup.OldPosition.x = UPVItem->Position.xPos;
|
||||
coll->Setup.OldPosition.y = UPVItem->Position.yPos;
|
||||
coll->Setup.OldPosition.z = UPVItem->Position.zPos;
|
||||
|
@ -432,6 +433,7 @@ static void BackgroundCollision(ITEM_INFO* laraItem, ITEM_INFO* UPVItem)
|
|||
coll->Setup.FloorSlopeIsWall = false;
|
||||
coll->Setup.FloorSlopeIsPit = false;
|
||||
coll->Setup.DeathFlagIsPit = false;
|
||||
coll->Setup.NoMonkeyFlagIsWall = false;
|
||||
coll->Setup.EnableSpasm = false;
|
||||
coll->Setup.EnableObjectPush = true;
|
||||
coll->Setup.Mode = CollisionProbeMode::Quadrants;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue