summaryrefslogtreecommitdiff
path: root/src/simulation/elements/SHLD4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/SHLD4.cpp')
-rw-r--r--src/simulation/elements/SHLD4.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/simulation/elements/SHLD4.cpp b/src/simulation/elements/SHLD4.cpp
index 95c8ae4..3ce4988 100644
--- a/src/simulation/elements/SHLD4.cpp
+++ b/src/simulation/elements/SHLD4.cpp
@@ -57,15 +57,14 @@ int Element_SHLD4::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
{
- if (1>rand()%5500)
+ if (!(rand()%5500))
{
np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1);
if (np<0) continue;
parts[np].life=7;
sim->part_change_type(i,x,y,PT_SHLD2);
}
- else
- continue;
+ continue;
}
if ((r&0xFF)==PT_SHLD2 && parts[i].life>3)
@@ -89,4 +88,4 @@ int Element_SHLD4::update(UPDATE_FUNC_ARGS)
}
-Element_SHLD4::~Element_SHLD4() {} \ No newline at end of file
+Element_SHLD4::~Element_SHLD4() {}