fixes to ELEC (missed from 6dc7eaf43e), FUSE (changed in 27e3e12518), and IRON (changed in 0d70547cf0)

This commit is contained in:
jacob1 2014-11-05 19:15:57 -05:00
parent 66a530f5a3
commit 43bab359db
3 changed files with 10 additions and 7 deletions

View File

@ -87,6 +87,7 @@ int Element_ELEC::update(UPDATE_FUNC_ARGS)
sim->create_part(r>>8, x+rx, y+ry, PT_O2);
else
sim->create_part(r>>8, x+rx, y+ry, PT_H2);
sim->kill_part(i);
return 1;
case PT_PROT: // this is the correct reaction, not NEUT, but leaving NEUT in anyway
if (parts[r>>8].tmp2 & 0x1)

View File

@ -80,10 +80,10 @@ int Element_FUSE::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
continue;
if ((r&0xFF)==PT_SPRK || ((parts[i].temp>=(273.15+700.0f)) && parts[i].life>40 && !(rand()%20)))
if ((r&0xFF)==PT_SPRK || (parts[i].temp>=(273.15+700.0f) && !(rand()%20)))
{
parts[i].life = 39;
if (parts[i].life > 40)
parts[i].life = 39;
}
}
return 0;

View File

@ -50,6 +50,8 @@ Element_IRON::Element_IRON()
int Element_IRON::update(UPDATE_FUNC_ARGS)
{
int r, rx, ry, rt;
if (!parts[i].life)
return 0;
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
if (BOUNDS_CHECK && (rx || ry))
@ -58,19 +60,19 @@ int Element_IRON::update(UPDATE_FUNC_ARGS)
switch (r&0xFF)
{
case PT_SALT:
if (!(parts[i].life) && !(rand()%47))
if (!(rand()%47))
goto succ;
break;
case PT_SLTW:
if (!(parts[i].life) && !(rand()%67))
if (!(rand()%67))
goto succ;
break;
case PT_WATR:
if (!(parts[i].life) && !(rand()%1200))
if (!(rand()%1200))
goto succ;
break;
case PT_O2:
if (!(parts[i].life) && !(rand()%250))
if (!(rand()%250))
goto succ;
break;
case PT_LO2: