summaryrefslogtreecommitdiff
path: root/src
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
parent4124738a0e7dc4f105593612e86951a77d766173 (diff)
downloadpowder-c26cfa29c20c970d0b442faa3b3ad45345585453.zip
powder-c26cfa29c20c970d0b442faa3b3ad45345585453.tar.gz
LCRY tweaks
Diffstat (limited to 'src')
-rw-r--r--src/elements/lcry.c14
-rw-r--r--src/main.c2
2 files changed, 11 insertions, 5 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))
diff --git a/src/main.c b/src/main.c
index d70eb56..16d609d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1034,7 +1034,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
}
}
}
- if(ver>=67 && (ty==PT_LCRY)){
+ if(ver<67 && (ty==PT_LCRY)){
//New LCRY uses TMP not life
if(parts[i-1].life>=10)
{