fix WOOD sometimes creating water when burning

This commit is contained in:
jacob1 2015-05-10 20:54:55 -04:00
parent 38e21c8236
commit aa854557f7

View File

@ -3669,9 +3669,22 @@ void Simulation::UpdateParticles(int start, int end)
parts[i].ctype = parts[i].type; parts[i].ctype = parts[i].type;
if (!(t==PT_ICEI && parts[i].ctype==PT_FRZW)) if (!(t==PT_ICEI && parts[i].ctype==PT_FRZW))
parts[i].life = 0; parts[i].life = 0;
if (t == PT_FIRE)
{
//hackish, if tmp isn't 0 the FIRE might turn into DSTW later
//idealy transitions should use create_part(i) but some elements rely on properties staying constant
//and I don't feel like checking each one right now
parts[i].tmp = 0;
}
if (elements[t].State==ST_GAS && elements[parts[i].type].State!=ST_GAS) if (elements[t].State==ST_GAS && elements[parts[i].type].State!=ST_GAS)
pv[y/CELL][x/CELL] += 0.50f; pv[y/CELL][x/CELL] += 0.50f;
if (t == PT_NONE)
{
kill_part(i);
goto killed;
}
else
part_change_type(i,x,y,t); part_change_type(i,x,y,t);
if (t==PT_FIRE || t==PT_PLSM || t==PT_CFLM) if (t==PT_FIRE || t==PT_PLSM || t==PT_CFLM)
@ -3684,11 +3697,6 @@ void Simulation::UpdateParticles(int start, int end)
else if (parts[i].ctype == PT_PQRT) parts[i].ctype = PT_QRTZ; else if (parts[i].ctype == PT_PQRT) parts[i].ctype = PT_QRTZ;
parts[i].life = rand()%120+240; parts[i].life = rand()%120+240;
} }
if (t == PT_NONE)
{
kill_part(i);
goto killed;
}
transitionOccurred = true; transitionOccurred = true;
} }