Display numeric value of ctype instead of element name translation for elements which use it as wavelengths

This commit is contained in:
jacksonmj 2014-03-08 13:34:03 +00:00
parent 21854df9f3
commit 55fbf13157

View File

@ -2074,6 +2074,10 @@ void GameView::OnDraw()
int ctype = sample.particle.ctype; int ctype = sample.particle.ctype;
if (sample.particle.type == PT_PIPE || sample.particle.type == PT_PPIP) if (sample.particle.type == PT_PIPE || sample.particle.type == PT_PPIP)
ctype = sample.particle.tmp&0xFF; ctype = sample.particle.tmp&0xFF;
if (sample.particle.type == PT_PHOT || sample.particle.type == PT_BIZR || sample.particle.type == PT_BIZRG || sample.particle.type == PT_BIZRS || sample.particle.type == PT_FILT || sample.particle.type == PT_BRAY)
wavelengthGfx = ctype;
if(showDebug) if(showDebug)
{ {
if (sample.particle.type == PT_LAVA && c->IsValidElement(ctype)) if (sample.particle.type == PT_LAVA && c->IsValidElement(ctype))
@ -2094,7 +2098,9 @@ void GameView::OnDraw()
else else
{ {
sampleInfo << c->ElementResolve(sample.particle.type, sample.particle.ctype); sampleInfo << c->ElementResolve(sample.particle.type, sample.particle.ctype);
if (c->IsValidElement(ctype)) if (wavelengthGfx)
sampleInfo << " (" << ctype << ")";
else if (c->IsValidElement(ctype))
sampleInfo << " (" << c->ElementResolve(ctype, -1) << ")"; sampleInfo << " (" << c->ElementResolve(ctype, -1) << ")";
else else
sampleInfo << " ()"; sampleInfo << " ()";
@ -2117,10 +2123,6 @@ void GameView::OnDraw()
sampleInfo << ", Temp: " << std::fixed << sample.particle.temp - 273.15f << " C"; sampleInfo << ", Temp: " << std::fixed << sample.particle.temp - 273.15f << " C";
sampleInfo << ", Pressure: " << std::fixed << sample.AirPressure; sampleInfo << ", Pressure: " << std::fixed << sample.AirPressure;
} }
if (sample.particle.type == PT_PHOT || sample.particle.type == PT_BIZR || sample.particle.type == PT_BIZRG || sample.particle.type == PT_BIZRS)
wavelengthGfx = sample.particle.ctype;
if (sample.particle.type == PT_FILT && sample.particle.ctype)
wavelengthGfx = sample.particle.ctype;
} }
else if (sample.WallType) else if (sample.WallType)
{ {