diff --git a/includes/powder.h b/includes/powder.h index 66816b084..d6862da92 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -891,9 +891,9 @@ static int lolzrule[9][9] = {0,1,0,0,0,0,0,1,0}, {0,1,0,0,0,0,0,1,0}, }; -int portal[MAX_TEMP/100][8][80]; -float portaltemp[MAX_TEMP/100][8][80]; -int wireless[MAX_TEMP/100][2]; +int portal[(int)(MAX_TEMP-73.15f)/100+2][8][80]; +float portaltemp[(int)(MAX_TEMP-73.15f)/100+2][8][80]; +int wireless[(int)(MAX_TEMP-73.15f)/100+2][2]; extern int isplayer; extern float player[27]; diff --git a/src/elements/prti.c b/src/elements/prti.c index 33b449fd5..ff9f4598a 100644 --- a/src/elements/prti.c +++ b/src/elements/prti.c @@ -1,11 +1,9 @@ #include int update_PRTI(UPDATE_FUNC_ARGS) { - int r, temp, nnx, temprange = 100; + int r, nnx; int count =0; - for ( temp = 0; temp < MAX_TEMP; temp += temprange) - if (parts[i].temp-73.15>temp&&parts[i].temp-73.15 =0 && y+ny>0 && diff --git a/src/elements/prto.c b/src/elements/prto.c index f7f97fc50..acaa689bf 100644 --- a/src/elements/prto.c +++ b/src/elements/prto.c @@ -1,11 +1,9 @@ #include int update_PRTO(UPDATE_FUNC_ARGS) { - int r, temp, nnx, temprange = 100; + int r, nnx; int count = 0; - for ( temp = 0; temp < MAX_TEMP; temp += temprange) - if (parts[i].temp-73.15>temp&&parts[i].temp-73.15 -2; ny--) for (nx=1; nx>-2; nx--) if (x+nx>=0 && y+ny>0 && diff --git a/src/elements/wifi.c b/src/elements/wifi.c index fb1a522ee..6584a0086 100644 --- a/src/elements/wifi.c +++ b/src/elements/wifi.c @@ -1,10 +1,8 @@ #include int update_WIFI(UPDATE_FUNC_ARGS) { - int r, rx, ry, temp, temprange = 100; - for ( temp = 0; temp < MAX_TEMP; temp += temprange) - if (parts[i].temp-73.15>temp&&parts[i].temp-73.15 =0 && y+ry>0 && x+rx