From 2d0ce60afe568fb129872abf674aec12cb520907 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 4 May 2013 20:34:47 -0400 Subject: [PATCH] fix not being able to draw TUGN under high/low pressure --- src/simulation/Simulation.cpp | 8 +------- src/simulation/elements/DMG.cpp | 2 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 499748d6c..b110b723f 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2913,11 +2913,7 @@ int Simulation::create_part(int p, int x, int y, int tv) parts[i].dcolour = 0; parts[i].flags = 0; - if (t==PT_GLAS) - { - parts[i].pavg[1] = pv[y/CELL][x/CELL]; - } - else if (t==PT_QRTZ) + if (t == PT_GLAS || t == PT_QRTZ || t == PT_TUGN) { parts[i].pavg[1] = pv[y/CELL][x/CELL]; } @@ -2983,8 +2979,6 @@ int Simulation::create_part(int p, int x, int y, int tv) parts[i].life = rand()%50+60; break; case PT_QRTZ: - parts[i].tmp = (rand()%11); - break; case PT_PQRT: parts[i].tmp = (rand()%11); break; diff --git a/src/simulation/elements/DMG.cpp b/src/simulation/elements/DMG.cpp index a79670173..4f1daafdb 100644 --- a/src/simulation/elements/DMG.cpp +++ b/src/simulation/elements/DMG.cpp @@ -92,6 +92,8 @@ int Element_DMG::update(UPDATE_FUNC_ARGS) sim->part_change_type(rr>>8, x+nxi, y+nxj, PT_BCOL); else if(t == PT_QRTZ) sim->part_change_type(rr>>8, x+nxi, y+nxj, PT_PQRT); + else if(t == PT_TUGN) + sim->part_change_type(rr>>8, x+nxi, y+nxj, PT_BRMT); } } }