Skip to content

Commit

Permalink
fix WOOD sometimes creating water when burning
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed May 11, 2015
1 parent 38e21c8 commit aa85455
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/simulation/Simulation.cpp
Expand Up @@ -3669,10 +3669,23 @@ void Simulation::UpdateParticles(int start, int end)
parts[i].ctype = parts[i].type;
if (!(t==PT_ICEI && parts[i].ctype==PT_FRZW))
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)
pv[y/CELL][x/CELL] += 0.50f;

part_change_type(i,x,y,t);
if (t == PT_NONE)
{
kill_part(i);
goto killed;
}
else
part_change_type(i,x,y,t);

if (t==PT_FIRE || t==PT_PLSM || t==PT_CFLM)
parts[i].life = rand()%50+120;
Expand All @@ -3684,11 +3697,6 @@ void Simulation::UpdateParticles(int start, int end)
else if (parts[i].ctype == PT_PQRT) parts[i].ctype = PT_QRTZ;
parts[i].life = rand()%120+240;
}
if (t == PT_NONE)
{
kill_part(i);
goto killed;
}
transitionOccurred = true;
}

Expand Down

0 comments on commit aa85455

Please sign in to comment.