diff --git a/src/powder.c b/src/powder.c index b3587cc1a..817c5f779 100644 --- a/src/powder.c +++ b/src/powder.c @@ -755,12 +755,15 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a if (t==SPC_HEAT||t==SPC_COOL) { - if ((pmap[y][x]&0xFF)!=PT_NONE&&(pmap[y][x]&0xFF)>8].temp>8].temp>8].temp = restrict_flt(parts[r>>8].temp + heatchange, MIN_TEMP, MAX_TEMP); } - if (t==SPC_COOL&&parts[pmap[y][x]>>8].temp>MIN_TEMP) + if (t==SPC_COOL&&parts[r>>8].temp>MIN_TEMP) { float heatchange; - int r = pmap[y][x], fast = ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))); + int fast = ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))); if ((r&0xFF)==PT_PUMP || (r&0xFF)==PT_GPMP) heatchange = fast?1.0f:.1f; else @@ -779,7 +782,7 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a parts[r>>8].temp = restrict_flt(parts[r>>8].temp - heatchange, MIN_TEMP, MAX_TEMP); } - return pmap[y][x]>>8; + return r>>8; } else {