mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
i think it is fixed now
This commit is contained in:
parent
d6dd107ce8
commit
06b3c45f33
|
|
@ -34,7 +34,11 @@ ChoiceTask::ChoiceTask(Tutorial *tutorial, int descriptionId, int promptId /*= -
|
||||||
|
|
||||||
bool ChoiceTask::isCompleted()
|
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 )
|
if( m_bConfirmMappingComplete || m_bCancelMappingComplete )
|
||||||
{
|
{
|
||||||
|
|
@ -50,31 +54,38 @@ bool ChoiceTask::isCompleted()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If the player is under water then allow all keypresses so they can jump out
|
// 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 (pMinecraft->localplayers[tutorial->getPad()]->isUnderLiquid(Material::water)) return false;
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
if(!m_bConfirmMappingComplete && InputManager.GetValue(pMinecraft->player->GetXboxPad(), m_iConfirmMapping) > 0 || KMInput.IsKeyDown(VK_RETURN))
|
if (!m_bConfirmMappingComplete &&
|
||||||
|
(InputManager.GetValue(xboxPad, m_iConfirmMapping) > 0
|
||||||
|
|| KMInput.IsKeyDown(VK_RETURN)))
|
||||||
#else
|
#else
|
||||||
if (!m_bConfirmMappingComplete && InputManager.GetValue(pMinecraft->player->GetXboxPad(), m_iConfirmMapping) > 0)
|
if (!m_bConfirmMappingComplete &&
|
||||||
|
InputManager.GetValue(xboxPad, m_iConfirmMapping) > 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
m_bConfirmMappingComplete = true;
|
m_bConfirmMappingComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
if(!m_bCancelMappingComplete && InputManager.GetValue(pMinecraft->player->GetXboxPad(), m_iCancelMapping) > 0 || KMInput.IsKeyDown('B'))
|
if (!m_bCancelMappingComplete &&
|
||||||
|
(InputManager.GetValue(xboxPad, m_iCancelMapping) > 0
|
||||||
|
|| KMInput.IsKeyDown('B')))
|
||||||
#else
|
#else
|
||||||
if (!m_bCancelMappingComplete && InputManager.GetValue(pMinecraft->player->GetXboxPad(), m_iCancelMapping) > 0)
|
if (!m_bCancelMappingComplete &&
|
||||||
|
InputManager.GetValue(xboxPad, m_iCancelMapping) > 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
m_bCancelMappingComplete = true;
|
m_bCancelMappingComplete = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(m_bConfirmMappingComplete || m_bCancelMappingComplete)
|
if (m_bConfirmMappingComplete || m_bCancelMappingComplete)
|
||||||
{
|
{
|
||||||
sendTelemetry();
|
sendTelemetry();
|
||||||
enableConstraints(false, true);
|
enableConstraints(false, true);
|
||||||
|
}
|
||||||
|
return m_bConfirmMappingComplete || m_bCancelMappingComplete;
|
||||||
}
|
}
|
||||||
return m_bConfirmMappingComplete || m_bCancelMappingComplete;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eTutorial_CompletionAction ChoiceTask::getCompletionAction()
|
eTutorial_CompletionAction ChoiceTask::getCompletionAction()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue