Change ForceOtherPlayersToCompatibleSteps to treat NULL steps as a failed match.

This commit is contained in:
Kyzentun Keeslala
2015-05-20 23:22:51 -06:00
parent cc2e166c18
commit c155ccffbc
+4 -6
View File
@@ -1084,7 +1084,7 @@ void GameState::ForceOtherPlayersToCompatibleSteps(PlayerNumber main)
FOREACH_EnabledPlayer(pn)
{
Trail* pn_steps= m_pCurTrail[pn].Get();
bool match_failed= false;
bool match_failed= pn_steps == NULL;
if(steps_to_match != pn_steps && pn_steps != NULL)
{
StyleType pn_styletype= GAMEMAN->GetFirstCompatibleStyle(
@@ -1095,14 +1095,13 @@ void GameState::ForceOtherPlayersToCompatibleSteps(PlayerNumber main)
{
match_failed= true;
}
}
if(match_failed)
{
m_pCurTrail[pn].Set(steps_to_match);
}
}
}
}
else
{
Steps* steps_to_match= m_pCurSteps[main].Get();
@@ -1115,7 +1114,7 @@ void GameState::ForceOtherPlayersToCompatibleSteps(PlayerNumber main)
FOREACH_EnabledPlayer(pn)
{
Steps* pn_steps= m_pCurSteps[pn].Get();
bool match_failed= false;
bool match_failed= pn_steps == NULL;
if(steps_to_match != pn_steps && pn_steps != NULL)
{
StyleType pn_styletype= GAMEMAN->GetFirstCompatibleStyle(
@@ -1130,14 +1129,13 @@ void GameState::ForceOtherPlayersToCompatibleSteps(PlayerNumber main)
{
match_failed= true;
}
}
if(match_failed)
{
m_pCurSteps[pn].Set(steps_to_match);
}
}
}
}
}
void GameState::Update( float fDelta )