diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2013-09-08 08:21:08 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2013-09-08 08:26:31 (GMT) |
| commit | 79edfe9589c4b82ce320e0ae88d043b66b14f570 (patch) | |
| tree | 476541f19227f01da686f9462d9f5b3fda685a35 /src/gui/game/GameView.cpp | |
| parent | 8d96f3f6b6a872956cac4217c4a8f56d6316738b (diff) | |
| download | powder-79edfe9589c4b82ce320e0ae88d043b66b14f570.zip powder-79edfe9589c4b82ce320e0ae88d043b66b14f570.tar.gz | |
Include elements[].Enabled in check for invalid lava ctype
Diffstat (limited to 'src/gui/game/GameView.cpp')
| -rw-r--r-- | src/gui/game/GameView.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index 65f341a..5d0cc34 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -2069,7 +2069,7 @@ void GameView::OnDraw() ctype = sample.particle.tmp&0xFF; if(showDebug) { - if (sample.particle.type == PT_LAVA && ctype > 0 && ctype < PT_NUM) + if (sample.particle.type == PT_LAVA && c->IsValidElement(ctype)) sampleInfo << "Molten " << c->ElementResolve(ctype, -1); else if ((sample.particle.type == PT_PIPE || sample.particle.type == PT_PPIP) && ctype > 0 && ctype < PT_NUM) sampleInfo << c->ElementResolve(sample.particle.type, -1) << " with " << c->ElementResolve(ctype, (int)sample.particle.pavg[1]); @@ -2087,7 +2087,7 @@ void GameView::OnDraw() else { sampleInfo << c->ElementResolve(sample.particle.type, sample.particle.ctype); - if(ctype > 0 && ctype < PT_NUM) + if (c->IsValidElement(ctype)) sampleInfo << " (" << c->ElementResolve(ctype, -1) << ")"; else sampleInfo << " ()"; |
