mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #42 from timgame/DDRace64
added option to automap tiles with index 0
This commit is contained in:
commit
8953d37369
|
@ -63,6 +63,7 @@ void CAutoMapper::Load(const char* pTileName)
|
|||
NewIndexRule.m_Flag = 0;
|
||||
NewIndexRule.m_RandomValue = 0;
|
||||
NewIndexRule.m_BaseTile = false;
|
||||
NewIndexRule.m_DefaultRule = true;
|
||||
|
||||
if(str_length(aFlip) > 0)
|
||||
{
|
||||
|
@ -112,6 +113,10 @@ void CAutoMapper::Load(const char* pTileName)
|
|||
{
|
||||
sscanf(pLine, "Random %d", &pCurrentIndex->m_RandomValue);
|
||||
}
|
||||
else if(!str_comp_num(pLine, "CheckEmptyTiles", 15) && pCurrentIndex)
|
||||
{
|
||||
pCurrentIndex->m_DefaultRule = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,7 +136,7 @@ void CAutoMapper::Load(const char* pTileName)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if(!Found)
|
||||
if(!Found && m_lConfigs[h].m_aIndexRules[i].m_DefaultRule)
|
||||
{
|
||||
CPosRule NewPosRule = {0, 0, CPosRule::FULL, false};
|
||||
m_lConfigs[h].m_aIndexRules[i].m_aRules.add(NewPosRule);
|
||||
|
|
|
@ -26,6 +26,7 @@ class CAutoMapper
|
|||
int m_Flag;
|
||||
int m_RandomValue;
|
||||
bool m_BaseTile;
|
||||
bool m_DefaultRule;
|
||||
};
|
||||
|
||||
struct CConfiguration
|
||||
|
|
Loading…
Reference in a new issue