summaryrefslogtreecommitdiff
path: root/src/simulation/elements/SING.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/SING.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/SING.cpp')
-rw-r--r--src/simulation/elements/SING.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/SING.cpp b/src/simulation/elements/SING.cpp
index 78641a8..878dac3 100644
--- a/src/simulation/elements/SING.cpp
+++ b/src/simulation/elements/SING.cpp
@@ -121,7 +121,7 @@ int Element_SING::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
continue;
- if ((r&0xFF)!=PT_DMND&&33>=rand()/(RAND_MAX/100)+1)
+ if ((r&0xFF)!=PT_DMND&& !(rand()%3))
{
if ((r&0xFF)==PT_SING && parts[r>>8].life >10)
{
@@ -133,7 +133,7 @@ int Element_SING::update(UPDATE_FUNC_ARGS)
{
if (parts[i].life+3 > 255)
{
- if (parts[r>>8].type!=PT_SING && 1>rand()%100)
+ if (parts[r>>8].type!=PT_SING && !(rand()%100))
{
int np;
np = sim->create_part(r>>8,x+rx,y+ry,PT_SING);