Don't heat elements which don't conduct heat
This commit is contained in:
parent
2f46dca7c1
commit
fc4836e69b
@ -43,7 +43,7 @@ int update_DEST(UPDATE_FUNC_ARGS) {
|
||||
}
|
||||
else
|
||||
{
|
||||
parts[r>>8].temp = restrict_flt(parts[r>>8].temp+10000.0f, MIN_TEMP, MAX_TEMP);
|
||||
if (ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+10000.0f, MIN_TEMP, MAX_TEMP);
|
||||
}
|
||||
int topv=pv[y/CELL][x/CELL]/9+parts[r>>8].temp/900;
|
||||
if (topv>40.0f)
|
||||
|
@ -35,7 +35,7 @@ int update_EMP(UPDATE_FUNC_ARGS) {
|
||||
parts[r].ctype==PT_NTCT || parts[r].ctype==PT_INST || parts[r].ctype==PT_SWCH) || t==PT_WIRE || t==PT_SWCH)
|
||||
{
|
||||
is_elec=1;
|
||||
if (rand()%100==0)
|
||||
if (ptypes[parts[r].type].hconduct && rand()%100==0)
|
||||
parts[r].temp = restrict_flt(parts[r].temp+3000.0f, MIN_TEMP, MAX_TEMP);
|
||||
if (rand()%80==0)
|
||||
part_change_type(r, rx, ry, PT_BREC);
|
||||
|
@ -114,12 +114,12 @@ int update_LIGH(UPDATE_FUNC_ARGS)
|
||||
parts[r>>8].life = 4;
|
||||
|
||||
pv[y/CELL][x/CELL] += powderful/1200;
|
||||
parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/20, MIN_TEMP, MAX_TEMP);
|
||||
if (ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/20, MIN_TEMP, MAX_TEMP);
|
||||
}
|
||||
else if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT)
|
||||
{
|
||||
pv[y/CELL][x/CELL] += powderful/110;
|
||||
parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/1.5, MIN_TEMP, MAX_TEMP);
|
||||
if (ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/1.5, MIN_TEMP, MAX_TEMP);
|
||||
}
|
||||
if ((r&0xFF)==PT_DEUT || (r&0xFF)==PT_PLUT)
|
||||
{
|
||||
@ -134,12 +134,15 @@ int update_LIGH(UPDATE_FUNC_ARGS)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ptypes[r&0xFF].hconduct)
|
||||
{
|
||||
if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT)
|
||||
parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/16, MIN_TEMP, MAX_TEMP);
|
||||
else
|
||||
parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/70, MIN_TEMP, MAX_TEMP);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (parts[i].tmp2==3)
|
||||
{
|
||||
//if (rand()&1)
|
||||
|
Loading…
Reference in New Issue
Block a user