summaryrefslogtreecommitdiff
path: root/src/simulation/elements/PVOD.cpp
diff options
context:
space:
mode:
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() {}