Fix "B12345678/S012345678/17" appearing in HUD for ctype 78

This commit is contained in:
jacob1 2021-07-13 20:53:58 -04:00
parent ae01c36f59
commit 9ac8b00b8d
No known key found for this signature in database
GPG Key ID: 4E58A32D510E1995

View File

@ -2145,17 +2145,17 @@ void GameView::OnDraw()
{
if (type == PT_LAVA && c->IsValidElement(ctype))
{
sampleInfo << "Molten " << c->ElementResolve(ctype, -1);
sampleInfo << "Molten " << c->ElementResolve(ctype, 0);
}
else if ((type == PT_PIPE || type == PT_PPIP) && c->IsValidElement(ctype))
{
if (ctype == PT_LAVA && c->IsValidElement((int)sample.particle.pavg[1]))
{
sampleInfo << c->ElementResolve(type, -1) << " with molten " << c->ElementResolve((int)sample.particle.pavg[1], -1);
sampleInfo << c->ElementResolve(type, 0) << " with molten " << c->ElementResolve((int)sample.particle.pavg[1], -1);
}
else
{
sampleInfo << c->ElementResolve(type, -1) << " with " << c->ElementResolve(ctype, (int)sample.particle.pavg[1]);
sampleInfo << c->ElementResolve(type, 0) << " with " << c->ElementResolve(ctype, (int)sample.particle.pavg[1]);
}
}
else if (type == PT_LIFE)
@ -2182,7 +2182,7 @@ void GameView::OnDraw()
else if (type == PT_CLNE || type == PT_BCLN || type == PT_PCLN || type == PT_PBCN || type == PT_DTEC)
sampleInfo << " (" << c->ElementResolve(ctype, sample.particle.tmp) << ")";
else if (c->IsValidElement(ctype))
sampleInfo << " (" << c->ElementResolve(ctype, -1) << ")";
sampleInfo << " (" << c->ElementResolve(ctype, 0) << ")";
else if (ctype)
sampleInfo << " (" << ctype << ")";
}