mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-12-02 22:18:09 +01:00
Merge branch 'feat/native-linux-support' of https://git.neolegacy.dev/neoStudiosLCE/neoLegacy into feat/native-linux-support
This commit is contained in:
commit
e10f2859f4
3 files changed
+21
-10
No files matched your search
@@ -369,11 +369,19 @@ void UIScene_InGameHostOptionsMenu::handleSliderMove(F64 sliderId, F64 currentVa
|
||||
case eControl_Difficulty:
|
||||
case eControl_GameMode:
|
||||
case eControl_Weather:
|
||||
if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll);
|
||||
m_bPendingSliderUpdate = true;
|
||||
m_iPendingSliderId = id;
|
||||
m_iPendingSliderValue = value;
|
||||
{
|
||||
int prevValue = m_bPendingSliderUpdate && m_iPendingSliderId == id ? m_iPendingSliderValue : (id == eControl_Difficulty ? m_iDifficulty : id == eControl_GameMode ? m_iGameType : m_iWeather);
|
||||
|
||||
if (value != prevValue)
|
||||
{
|
||||
if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll);
|
||||
m_bPendingSliderUpdate = true;
|
||||
m_iPendingSliderId = id;
|
||||
m_iPendingSliderValue = value;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -422,9 +422,13 @@ void UIScene_InGamePlayerOptionsMenu::handleSliderMove(F64 sliderId, F64 current
|
||||
m_multiList.handleSliderMove(id, value);
|
||||
if (id == eControl_GameMode)
|
||||
{
|
||||
if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll);
|
||||
m_bPendingSliderUpdate = true;
|
||||
m_iPendingSliderValue = value;
|
||||
int prevValue = m_bPendingSliderUpdate ? m_iPendingSliderValue : m_iGameType;
|
||||
if (value != prevValue)
|
||||
{
|
||||
if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll);
|
||||
m_bPendingSliderUpdate = true;
|
||||
m_iPendingSliderValue = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -349,9 +349,8 @@ void Boat::floatBoat()
|
||||
int py = Mth::floor(bb->y0);
|
||||
int pz = Mth::floor(z);
|
||||
Material *material = level->getMaterial(px, py, pz);
|
||||
Material *materialAbove = level->getMaterial(px, py + 1, pz);
|
||||
|
||||
if (material == Material::water && materialAbove == Material::air)
|
||||
if (status == IN_WATER)
|
||||
{
|
||||
buoyancy = (1.0 - (bb->y0 - py)) * 0.9 + buoyancyOffset;
|
||||
rock = (sin(rockPhase) + 1.0) * 0.035;
|
||||
@@ -359,7 +358,7 @@ void Boat::floatBoat()
|
||||
invFriction = 0.9f;
|
||||
floating = true;
|
||||
}
|
||||
else if (material == Material::water && materialAbove == Material::water)
|
||||
else if (status == UNDER_WATER || status == UNDER_FLOWING_WATER)
|
||||
{
|
||||
buoyancy = 1.0;
|
||||
invFriction = 0.9f;
|
||||
|
||||
Reference in new issue
Block a user