mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
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:
commit
5a4ebd9024
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue