summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-30 16:22:33 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-30 16:22:33 (GMT)
commit856f9574b6bf92c1b15d8e4f1a04869182eb05fb (patch)
treee526e307cd8c5b61ccbad09b0c94ddfbdab52cde /src/main.c
parentcb05f5c77ea47e76017f0fc7c5f19495f49d3151 (diff)
downloadpowder-856f9574b6bf92c1b15d8e4f1a04869182eb05fb.zip
powder-856f9574b6bf92c1b15d8e4f1a04869182eb05fb.tar.gz
Change LCRy workings and add ELEC (wip)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 9be4bd7..d70eb56 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1034,6 +1034,23 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
}
}
}
+ if(ver>=67 && (ty==PT_LCRY)){
+ //New LCRY uses TMP not life
+ if(parts[i-1].life>=10)
+ {
+ parts[i-1].life = 10;
+ parts[i-1].tmp = 3;
+ }
+ else if(parts[i-1].life<=0)
+ {
+ parts[i-1].life = 0;
+ parts[i-1].tmp = 0;
+ }
+ else if(parts[i-1].life < 10 && parts[i-1].life > 0)
+ {
+ parts[i-1].tmp = 1;
+ }
+ }
if (!ptypes[parts[i-1].type].enabled)
parts[i-1].type = PT_NONE;
}