//#TPT-Directive ElementHeader Element_HTER static int update(UPDATE_FUNC_ARGS)
int Element_HTER::update(UPDATE_FUNC_ARGS) {
int r,rx,ry;
for (rx=-2; rx<3; rx++)
for (ry=-2; ry<3; ry++)
if (BOUNDS_CHECK)
{
r=pmap[x+rx][y+ry];
if(r&0xFF!=PT_HTER && parts[r>>8].temp + parts[r>>8].temp * 0.2f <= MAX_TEMP){
parts[r>>8].temp += parts[r>>8].temp * 0.2f;
}
else {parts[r>>8].temp = MAX_TEMP;}
}
return 0;
}
and only way it does that is by conducting heat(So it doesn't do anything with heatconduct=0.)
what do you mean with that?
do you want it to heat other elements up without conducting?
or doesnt it conduct heat?
if it doesnt conduct heat
do heatconduct=256
> Proper indention makes the world go round.
So why didn't you use tabs? (Cue religious coding war here.)
//#TPT-Directive ElementHeader Element_HTER static int update(UPDATE_FUNC_ARGS)
int Element_HTER::update(UPDATE_FUNC_ARGS)
{
int r, rx, ry;
for (rx=-2; rx<3; rx++)
for (ry=-2; ry<3; ry++)
{
r = pmap[y+ry][x+rx];
// less expensive yet effective growth
if(r && (r&0xFF) != PT_HTER && parts[r>>8].temp * 2.2f < MAX_TEMP)
parts[r>>8].temp *= 2.2f;
}
return 0;
}
I can see two imediate reasons why that won't operate
1) you need this at the very bottom (outside the brakets)
Element_HETR::~Element_HETR() {}
2) you might want this after the pmap:
if (!r)
continue;