Copy dcolour when MERC expands, to let people make coloured mercury thermometers

This commit is contained in:
jacksonmj 2012-12-16 00:16:05 +00:00
parent a623959a31
commit e4907d1881

View File

@ -80,13 +80,14 @@ int Element_MERC::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx]; r = pmap[y+ry][x+rx];
if (parts[i].tmp<=maxtmp) if (parts[i].tmp<=maxtmp)
continue; continue;
if ((!r)&&parts[i].tmp>=1)//if nothing then create deut if ((!r)&&parts[i].tmp>=1)//if nothing then create MERC
{ {
np = sim->create_part(-1,x+rx,y+ry,PT_MERC); np = sim->create_part(-1,x+rx,y+ry,PT_MERC);
if (np<0) continue; if (np<0) continue;
parts[i].tmp--; parts[i].tmp--;
parts[np].temp = parts[i].temp; parts[np].temp = parts[i].temp;
parts[np].tmp = 0; parts[np].tmp = 0;
parts[np].dcolour = parts[i].dcolour;
} }
} }
for ( trade = 0; trade<4; trade ++) for ( trade = 0; trade<4; trade ++)