summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-04-28 13:35:00 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-05-05 19:35:08 (GMT)
commit0aa4970b330114f92a2293c86384559b3584926d (patch)
tree640bee9cb3462f4736c318911c19027026e0acad /src/elements
parent892a2b11c7a5f5ebd1071f3c72ce56fb61e26fe5 (diff)
downloadpowder-0aa4970b330114f92a2293c86384559b3584926d.zip
powder-0aa4970b330114f92a2293c86384559b3584926d.tar.gz
Remove some unnecessary checks
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/pyro.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/elements/pyro.c b/src/elements/pyro.c
index aeac407..985151a 100644
--- a/src/elements/pyro.c
+++ b/src/elements/pyro.c
@@ -32,11 +32,11 @@ int update_PYRO(UPDATE_FUNC_ARGS) {
if (bmap[(y+ry)/CELL][(x+rx)/CELL] && bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM)
continue;
rt = parts[r>>8].type;
- if ((surround_space || ptypes[rt].explosive) && (t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL && rt!=PT_SWCH)) &&
- !(t==PT_PHOT && rt==PT_INSL) &&
- (t!=PT_LAVA || parts[i].life>0 || (rt!=PT_STNE && rt!=PT_PSCN && rt!=PT_NSCN && rt!=PT_NTCT && rt!=PT_PTCT && rt!=PT_METL && rt!=PT_IRON && rt!=PT_ETRD && rt!=PT_BMTL && rt!=PT_BRMT && rt!=PT_SWCH && rt!=PT_INWR && rt!=PT_QRTZ))
- && !(rt==PT_SPNG && parts[r>>8].life>0) &&
- ptypes[rt].flammable && (ptypes[rt].flammable + (int)(pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000))
+ if ((surround_space || ptypes[rt].explosive) &&
+ (t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) &&
+ (t!=PT_PHOT || rt!=PT_INSL) &&
+ (rt!=PT_SPNG || parts[r>>8].life==0) &&
+ ptypes[rt].flammable && (ptypes[rt].flammable + (int)(pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000))
{
part_change_type(r>>8,x+rx,y+ry,PT_FIRE);
parts[r>>8].temp = restrict_flt(ptypes[PT_FIRE].heat + (ptypes[rt].flammable/2), MIN_TEMP, MAX_TEMP);
@@ -44,7 +44,6 @@ int update_PYRO(UPDATE_FUNC_ARGS) {
parts[r>>8].tmp = parts[r>>8].ctype = 0;
if (ptypes[rt].explosive)
pv[y/CELL][x/CELL] += 0.25f * CFDS;
- continue;
}
}
if (legacy_enable) update_legacy_PYRO(UPDATE_FUNC_SUBCALL_ARGS);