mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Don't render switch number and delay for tiles where they are unused
This commit is contained in:
parent
60c0da7c4d
commit
2e5f37c61b
|
@ -575,7 +575,7 @@ void CRenderTools::RenderSwitchOverlay(CSwitchTile *pSwitch, int w, int h, float
|
||||||
int c = mx + my * w;
|
int c = mx + my * w;
|
||||||
|
|
||||||
unsigned char Index = pSwitch[c].m_Number;
|
unsigned char Index = pSwitch[c].m_Number;
|
||||||
if(Index)
|
if(Index && IsSwitchTileNumberUsed(pSwitch[c].m_Type))
|
||||||
{
|
{
|
||||||
char aBuf[16];
|
char aBuf[16];
|
||||||
str_format(aBuf, sizeof(aBuf), "%d", Index);
|
str_format(aBuf, sizeof(aBuf), "%d", Index);
|
||||||
|
@ -585,7 +585,7 @@ void CRenderTools::RenderSwitchOverlay(CSwitchTile *pSwitch, int w, int h, float
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char Delay = pSwitch[c].m_Delay;
|
unsigned char Delay = pSwitch[c].m_Delay;
|
||||||
if(Delay)
|
if(Delay && IsSwitchTileDelayUsed(pSwitch[c].m_Type))
|
||||||
{
|
{
|
||||||
char aBuf[16];
|
char aBuf[16];
|
||||||
str_format(aBuf, sizeof(aBuf), "%d", Delay);
|
str_format(aBuf, sizeof(aBuf), "%d", Delay);
|
||||||
|
|
Loading…
Reference in a new issue