Merge pull request #40 from Tobii-/demofix

Fix: also record a demo when the start line is on the front layer
This commit is contained in:
Dennis Felsing 2014-09-19 21:00:16 +02:00
commit 5a4ebd9024

View file

@ -30,9 +30,17 @@ void CRaceDemo::OnRender()
std::list < int > Indices = m_pClient->Collision()->GetMapIndices(m_pClient->m_PredictedPrevChar.m_Pos, m_pClient->m_LocalCharacterPos);
if(!Indices.empty())
for(std::list < int >::iterator i = Indices.begin(); i != Indices.end(); i++)
{
if(m_pClient->Collision()->GetTileIndex(*i) == TILE_BEGIN) start = true;
if(m_pClient->Collision()->GetFTileIndex(*i) == TILE_BEGIN) start = true;
}
else
start = m_pClient->Collision()->GetTileIndex(m_pClient->Collision()->GetPureMapIndex(m_pClient->m_LocalCharacterPos)) == TILE_BEGIN;
{
if(m_pClient->Collision()->GetTileIndex(m_pClient->Collision()->GetPureMapIndex(m_pClient->m_LocalCharacterPos)) == TILE_BEGIN) start = true;
if(m_pClient->Collision()->GetFTileIndex(m_pClient->Collision()->GetPureMapIndex(m_pClient->m_LocalCharacterPos)) == TILE_BEGIN) start = true;
}
if(start)
{