diff --git a/src/elements/bizr.c b/src/elements/bizr.c index d8a59cf65..a49aa202f 100644 --- a/src/elements/bizr.c +++ b/src/elements/bizr.c @@ -35,5 +35,10 @@ int update_BIZR(UPDATE_FUNC_ARGS) { } } } + if(((r = photons[y][x])&0xFF)==PT_PHOT || ((r = pmap[y][x])&0xFF)==PT_PHOT) + { + part_change_type(r>>8, x, y, PT_ELEC); + parts[r>>8].ctype = 0; + } return 0; } diff --git a/src/elements/elec.c b/src/elements/elec.c index 014c16246..4c3232e4f 100644 --- a/src/elements/elec.c +++ b/src/elements/elec.c @@ -5,6 +5,10 @@ int update_ELEC(UPDATE_FUNC_ARGS) { float rr, rrr; parts[i].pavg[0] = x; parts[i].pavg[1] = y; + if(pmap[y][x]==PT_GLOW) + { + part_change_type(i, x, y, PT_PHOT); + } for (rx=-2; rx<=2; rx++) for (ry=-2; ry<=2; ry++) if (x+rx>=0 && y+ry>=0 && x+rx>8].life = 5+rand()%5; + parts[r>>8].tmp2 = 5+rand()%5; } if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW) { @@ -66,6 +70,15 @@ int update_ELEC(UPDATE_FUNC_ARGS) { parts[r>>8].life = 0; parts[r>>8].ctype = 0; } + if ((r&0xFF)==PT_DEUT) + { + if(parts[r>>8].life < 6000) + parts[r>>8].life += 1; + parts[r>>8].temp = 0; + parts[i].temp = 0; + kill_part(i); + return 1; + } if (ptypes[r&0xFF].properties & PROP_CONDUCTS) { create_part(-1, x+rx, y+ry, PT_SPRK); diff --git a/src/elements/lcry.c b/src/elements/lcry.c index 9d15c001f..b3c529f3c 100644 --- a/src/elements/lcry.c +++ b/src/elements/lcry.c @@ -14,6 +14,7 @@ int update_LCRY(UPDATE_FUNC_ARGS) parts[i].life-=2; if(parts[i].life < 0) parts[i].life = 0; + parts[i].tmp2 = parts[i].life; } } for (rx=-1; rx<2; rx++) @@ -40,6 +41,7 @@ int update_LCRY(UPDATE_FUNC_ARGS) parts[i].life+=2; if(parts[i].life > 10) parts[i].life = 10; + parts[i].tmp2 = parts[i].life; } } for (rx=-1; rx<2; rx++) @@ -55,6 +57,5 @@ int update_LCRY(UPDATE_FUNC_ARGS) } } } - parts[i].tmp = parts[i].tmp; return 0; } diff --git a/src/elements/newgraphics.c b/src/elements/newgraphics.c index 59161b93c..8af0f4552 100644 --- a/src/elements/newgraphics.c +++ b/src/elements/newgraphics.c @@ -355,7 +355,7 @@ int graphics_GLOW(GRAPHICS_FUNC_ARGS) } int graphics_LCRY(GRAPHICS_FUNC_ARGS) { - int lifemod = ((cpart->life>10?10:cpart->life)*10); + int lifemod = ((cpart->tmp2>10?10:cpart->tmp2)*10); *colr += lifemod; *colg += lifemod; *colb += lifemod; diff --git a/src/elements/sing.c b/src/elements/sing.c index 1f463bf4e..d6fc273fb 100644 --- a/src/elements/sing.c +++ b/src/elements/sing.c @@ -40,10 +40,17 @@ int update_SING(UPDATE_FUNC_ARGS) { spawncount = spawncount*spawncount*M_PI; for (j=0;j=10) + if(ty==PT_LCRY){ + if(ver<67) { - parts[i-1].life = 10; - parts[i-1].tmp = 3; + //New LCRY uses TMP not life + if(parts[i-1].life>=10) + { + parts[i-1].life = 10; + parts[i-1].tmp2 = 10; + parts[i-1].tmp = 3; + } + else if(parts[i-1].life<=0) + { + parts[i-1].life = 0; + parts[i-1].tmp2 = 0; + parts[i-1].tmp = 0; + } + else if(parts[i-1].life < 10 && parts[i-1].life > 0) + { + parts[i-1].tmp = 1; + } } - else if(parts[i-1].life<=0) + else { - 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; + parts[i-1].tmp2 = parts[i-1].life; } } if (!ptypes[parts[i-1].type].enabled) diff --git a/src/powder.c b/src/powder.c index fe2575092..c03da983c 100644 --- a/src/powder.c +++ b/src/powder.c @@ -143,6 +143,14 @@ void init_can_move() } can_move[PT_ELEC][PT_LCRY] = 2; can_move[PT_PHOT][PT_LCRY] = 3;//varies according to LCRY life + + can_move[PT_PHOT][PT_BIZR] = 2; + can_move[PT_ELEC][PT_BIZR] = 2; + can_move[PT_PHOT][PT_BIZRG] = 2; + can_move[PT_ELEC][PT_BIZRG] = 2; + can_move[PT_PHOT][PT_BIZRS] = 2; + can_move[PT_ELEC][PT_BIZRS] = 2; + can_move[PT_NEUT][PT_INVIS] = 2; //whol eats anar can_move[PT_ANAR][PT_WHOL] = 1;