summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-31 15:35:27 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-31 15:35:27 (GMT)
commitc26cfa29c20c970d0b442faa3b3ad45345585453 (patch)
tree4c0f2591f07b48a8a00e6570201e765b6a966180 /src/elements
parent4124738a0e7dc4f105593612e86951a77d766173 (diff)
downloadpowder-c26cfa29c20c970d0b442faa3b3ad45345585453.zip
powder-c26cfa29c20c970d0b442faa3b3ad45345585453.tar.gz
LCRY tweaks
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/lcry.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/elements/lcry.c b/src/elements/lcry.c
index e570c90..9d15c00 100644
--- a/src/elements/lcry.c
+++ b/src/elements/lcry.c
@@ -10,9 +10,12 @@ int update_LCRY(UPDATE_FUNC_ARGS)
if(parts[i].life<=0)
parts[i].tmp = 0;
else
- parts[i].life--;
+ {
+ parts[i].life-=2;
+ if(parts[i].life < 0)
+ parts[i].life = 0;
+ }
}
-
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
@@ -33,9 +36,12 @@ int update_LCRY(UPDATE_FUNC_ARGS)
if(parts[i].life>=10)
parts[i].tmp = 3;
else
- parts[i].life++;
+ {
+ parts[i].life+=2;
+ if(parts[i].life > 10)
+ parts[i].life = 10;
+ }
}
-
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))