summaryrefslogtreecommitdiff
path: root/src/simulation/elements/PCLN.cpp
diff options
context:
space:
mode:
authorcracker64 <cracker642@gmail.com>2013-02-28 05:40:36 (GMT)
committer cracker64 <cracker642@gmail.com>2013-02-28 05:40:36 (GMT)
commitc65081d3ed44a97cea0f41a63e9ec07cf0feb5f2 (patch)
tree90744a56bc618c12aab5ef617445b283ce2d6d57 /src/simulation/elements/PCLN.cpp
parent08d1a68ce091b6ba53788224fd1bda92c1895ca6 (diff)
downloadpowder-c65081d3ed44a97cea0f41a63e9ec07cf0feb5f2.zip
powder-c65081d3ed44a97cea0f41a63e9ec07cf0feb5f2.tar.gz
Finished first pass-through for all elements.
Will get a few more places later.
Diffstat (limited to 'src/simulation/elements/PCLN.cpp')
-rw-r--r--src/simulation/elements/PCLN.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/simulation/elements/PCLN.cpp b/src/simulation/elements/PCLN.cpp
index 926b232..afee3cb 100644
--- a/src/simulation/elements/PCLN.cpp
+++ b/src/simulation/elements/PCLN.cpp
@@ -59,12 +59,15 @@ int Element_PCLN::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
continue;
- if ((r&0xFF)==PT_SPRK && parts[r>>8].life>0 && parts[r>>8].life<4)
+ if ((r&0xFF)==PT_SPRK)
{
- if (parts[r>>8].ctype==PT_PSCN)
- parts[i].life = 10;
- else if (parts[r>>8].ctype==PT_NSCN)
- parts[i].life = 9;
+ if (parts[r>>8].life>0 && parts[r>>8].life<4)
+ {
+ if (parts[r>>8].ctype==PT_PSCN)
+ parts[i].life = 10;
+ else if (parts[r>>8].ctype==PT_NSCN)
+ parts[i].life = 9;
+ }
}
else if ((r&0xFF)==PT_PCLN)
{