mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-02 09:47:58 +03:00
Merge branch 'master' into state_cleaning_tier_2
This commit is contained in:
commit
cdb8eb5927
4 changed files with 15 additions and 14 deletions
|
@ -72,7 +72,14 @@ void lara_as_surftread(ITEM_INFO* item, COLL_INFO* coll)
|
|||
item->Position.yRot += ANGLE(4);
|
||||
}
|
||||
|
||||
if (TrInput & IN_FORWARD)
|
||||
if (TrInput & IN_JUMP)
|
||||
{
|
||||
Lara.Control.Count.Dive++;
|
||||
if (Lara.Control.Count.Dive == 10)
|
||||
SwimDive(item);
|
||||
return;
|
||||
}
|
||||
else if (TrInput & IN_FORWARD)
|
||||
{
|
||||
item->TargetState = LS_ONWATER_FORWARD;
|
||||
return;
|
||||
|
@ -97,13 +104,6 @@ void lara_as_surftread(ITEM_INFO* item, COLL_INFO* coll)
|
|||
item->TargetState = LS_ONWATER_RIGHT;
|
||||
return;
|
||||
}
|
||||
else if (TrInput & IN_JUMP)
|
||||
{
|
||||
Lara.Control.Count.Dive++;
|
||||
if (Lara.Control.Count.Dive == 10)
|
||||
SwimDive(item);
|
||||
return;
|
||||
}
|
||||
|
||||
Lara.Control.Count.Dive = 0;
|
||||
item->TargetState = LS_ONWATER_STOP;
|
||||
|
|
|
@ -229,7 +229,7 @@ bool TestLaraHangJump(ITEM_INFO* item, COLL_INFO* coll)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (TestHangSwingIn(item))
|
||||
if (TestHangSwingIn(item, coll))
|
||||
{
|
||||
SetAnimation(item, LA_REACH_TO_HANG_OSCILLATE);
|
||||
ResetLaraFlex(item);
|
||||
|
@ -766,15 +766,15 @@ int TestLaraEdgeCatch(ITEM_INFO* item, COLL_INFO* coll, int* edge)
|
|||
return 1;
|
||||
}
|
||||
|
||||
bool TestHangSwingIn(ITEM_INFO* item)
|
||||
bool TestHangSwingIn(ITEM_INFO* item, COLL_INFO* coll)
|
||||
{
|
||||
auto info = GetLaraInfo(item);
|
||||
|
||||
int y = item->Position.yPos;
|
||||
auto probe = GetCollisionResult(item, item->Position.yRot, CLICK(0.5f));
|
||||
auto probe = GetCollisionResult(item, item->Position.yRot, OFFSET_RADIUS(coll->Setup.Radius));
|
||||
|
||||
if ((probe.Position.Floor - y) > 0 &&
|
||||
(probe.Position.Ceiling - y) < -400 &&
|
||||
(probe.Position.Ceiling - y) < -CLICK(1.6f) &&
|
||||
probe.Position.Floor != NO_HEIGHT)
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -23,7 +23,7 @@ bool TestLaraHangOnClimbWall(ITEM_INFO* item, COLL_INFO* coll);
|
|||
int TestLaraEdgeCatch(ITEM_INFO* item, COLL_INFO* coll, int* edge);
|
||||
bool TestLaraValidHangPos(ITEM_INFO* item, COLL_INFO* coll);
|
||||
CornerResult TestLaraHangCorner(ITEM_INFO* item, COLL_INFO* coll, float testAngle);
|
||||
bool TestHangSwingIn(ITEM_INFO* item);
|
||||
bool TestHangSwingIn(ITEM_INFO* item, COLL_INFO* coll);
|
||||
bool TestLaraHangSideways(ITEM_INFO* item, COLL_INFO* coll, short angle);
|
||||
bool LaraPositionOnLOS(ITEM_INFO* item, short ang, int dist);
|
||||
bool TestLaraFacingCorner(ITEM_INFO* item, short angle, int dist);
|
||||
|
|
|
@ -695,7 +695,8 @@ InventoryResult GuiController::TitleOptions()
|
|||
else if (menu_to_display == Menu::SelectLevel)
|
||||
{
|
||||
SoundEffect(SFX_TR4_MENU_SELECT, 0, SFX_ALWAYS);
|
||||
g_GameFlow->SelectedLevelForNewGame = selected_option;
|
||||
// Level 0 is the title level, so increment the option by 1 to offset it.
|
||||
g_GameFlow->SelectedLevelForNewGame = selected_option + 1;
|
||||
menu_to_display = Menu::Title;
|
||||
selected_option = 0;
|
||||
ret = InventoryResult::NewGameSelectedLevel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue