TPT: Salt should only melt ice that is above saltwater freezing temperature 3e1d3cd5a6

This commit is contained in:
Simon Robertshaw
2012-07-25 19:33:40 +01:00
parent f8766201a6
commit a5d6c56f8c

View File

@@ -61,7 +61,7 @@ int Element_ICEI::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
continue;
if (((r&0xFF)==PT_SALT || (r&0xFF)==PT_SLTW) && 1>(rand()%1000))
if (((r&0xFF)==PT_SALT || (r&0xFF)==PT_SLTW) && parts[i].temp > ptransitions[PT_SLTW].tlv && 1>(rand()%1000))
{
sim->part_change_type(i,x,y,PT_SLTW);
sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW);