now able to press SPACE to continue on hints that wait for you to press A (#135)
* now possible to accept and decline tutorial hints that part when it asks if you want to do the tutorial (should work for when the games asks if you already know something like when opening inventories for the first time) * Update ChoiceTask.cpp * now able to press SPACE to continue on hints that wait for you to press A and the hints what wait for you to move the gamepad stick now just skip instantly * windows specific patch now * added ifdefs to shit i did * i think it is fixed now --------- Co-authored-by: daoge <3523206925@qq.com>
This commit is contained in:
@@ -34,7 +34,11 @@ ChoiceTask::ChoiceTask(Tutorial *tutorial, int descriptionId, int promptId /*= -
|
||||
|
||||
bool ChoiceTask::isCompleted()
|
||||
{
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
if (!pMinecraft || !pMinecraft->player)
|
||||
return false;
|
||||
|
||||
int xboxPad = pMinecraft->player->GetXboxPad();
|
||||
|
||||
if( m_bConfirmMappingComplete || m_bCancelMappingComplete )
|
||||
{
|
||||
@@ -50,24 +54,38 @@ bool ChoiceTask::isCompleted()
|
||||
else
|
||||
{
|
||||
// If the player is under water then allow all keypresses so they can jump out
|
||||
if( pMinecraft->localplayers[tutorial->getPad()]->isUnderLiquid(Material::water) ) return false;
|
||||
|
||||
if(!m_bConfirmMappingComplete && InputManager.GetValue(pMinecraft->player->GetXboxPad(), m_iConfirmMapping) > 0 || KMInput.IsKeyDown(VK_RETURN))
|
||||
if (pMinecraft->localplayers[tutorial->getPad()]->isUnderLiquid(Material::water)) return false;
|
||||
#ifdef _WINDOWS64
|
||||
if (!m_bConfirmMappingComplete &&
|
||||
(InputManager.GetValue(xboxPad, m_iConfirmMapping) > 0
|
||||
|| KMInput.IsKeyDown(VK_RETURN)))
|
||||
#else
|
||||
if (!m_bConfirmMappingComplete &&
|
||||
InputManager.GetValue(xboxPad, m_iConfirmMapping) > 0)
|
||||
#endif
|
||||
{
|
||||
m_bConfirmMappingComplete = true;
|
||||
}
|
||||
if(!m_bCancelMappingComplete && InputManager.GetValue(pMinecraft->player->GetXboxPad(), m_iCancelMapping) > 0 || KMInput.IsKeyDown('B'))
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
if (!m_bCancelMappingComplete &&
|
||||
(InputManager.GetValue(xboxPad, m_iCancelMapping) > 0
|
||||
|| KMInput.IsKeyDown('B')))
|
||||
#else
|
||||
if (!m_bCancelMappingComplete &&
|
||||
InputManager.GetValue(xboxPad, m_iCancelMapping) > 0)
|
||||
#endif
|
||||
{
|
||||
m_bCancelMappingComplete = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(m_bConfirmMappingComplete || m_bCancelMappingComplete)
|
||||
{
|
||||
sendTelemetry();
|
||||
enableConstraints(false, true);
|
||||
if (m_bConfirmMappingComplete || m_bCancelMappingComplete)
|
||||
{
|
||||
sendTelemetry();
|
||||
enableConstraints(false, true);
|
||||
}
|
||||
return m_bConfirmMappingComplete || m_bCancelMappingComplete;
|
||||
}
|
||||
return m_bConfirmMappingComplete || m_bCancelMappingComplete;
|
||||
}
|
||||
|
||||
eTutorial_CompletionAction ChoiceTask::getCompletionAction()
|
||||
|
||||
Reference in New Issue
Block a user