From 0aa4970b330114f92a2293c86384559b3584926d Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Thu, 28 Apr 2011 14:35:00 +0100 Subject: [PATCH] Remove some unnecessary checks --- src/elements/pyro.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/elements/pyro.c b/src/elements/pyro.c index aeac407e6..985151aca 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);