LCRY tweaks

This commit is contained in:
Simon Robertshaw 2011-10-31 15:35:27 +00:00
parent 4124738a0e
commit c26cfa29c2
2 changed files with 11 additions and 5 deletions

View File

@ -10,9 +10,12 @@ int update_LCRY(UPDATE_FUNC_ARGS)
if(parts[i].life<=0) if(parts[i].life<=0)
parts[i].tmp = 0; parts[i].tmp = 0;
else else
parts[i].life--; {
parts[i].life-=2;
if(parts[i].life < 0)
parts[i].life = 0;
}
} }
for (rx=-1; rx<2; rx++) for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++) for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || 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) if(parts[i].life>=10)
parts[i].tmp = 3; parts[i].tmp = 3;
else else
parts[i].life++; {
parts[i].life+=2;
if(parts[i].life > 10)
parts[i].life = 10;
}
} }
for (rx=-1; rx<2; rx++) for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++) for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))

View File

@ -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 //New LCRY uses TMP not life
if(parts[i-1].life>=10) if(parts[i-1].life>=10)
{ {