summaryrefslogtreecommitdiff
path: root/src/simulation/elements/PVOD.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/PVOD.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/PVOD.cpp')
-rw-r--r--src/simulation/elements/PVOD.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/simulation/elements/PVOD.cpp b/src/simulation/elements/PVOD.cpp
index 267c7bd..2478a7c 100644
--- a/src/simulation/elements/PVOD.cpp
+++ b/src/simulation/elements/PVOD.cpp
@@ -59,14 +59,17 @@ int Element_PVOD::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;
+ }
}
- if ((r&0xFF)==PT_PVOD)
+ else if ((r&0xFF)==PT_PVOD)
{
if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0)
parts[i].life = 9;
@@ -88,4 +91,4 @@ int Element_PVOD::graphics(GRAPHICS_FUNC_ARGS)
}
-Element_PVOD::~Element_PVOD() {} \ No newline at end of file
+Element_PVOD::~Element_PVOD() {}