Better channel handling

This commit is contained in:
jacksonmj
2011-01-09 21:12:25 +00:00
parent 6094753eb1
commit 88d107f18a
5 changed files with 10 additions and 16 deletions

View File

@@ -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];

View File

@@ -1,11 +1,9 @@
#include <powder.h>
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 <temp+temprange)
parts[i].tmp = temp/100;
parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1);
for (ny=-1; ny<2; ny++)
for (nx=-1; nx<2; nx++)
if (x+nx>=0 && y+ny>0 &&

View File

@@ -1,11 +1,9 @@
#include <powder.h>
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 <temp+temprange)
parts[i].tmp = temp/100;
parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1);
for (ny=1; ny>-2; ny--)
for (nx=1; nx>-2; nx--)
if (x+nx>=0 && y+ny>0 &&

View File

@@ -1,10 +1,8 @@
#include <powder.h>
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 <temp+temprange)
parts[i].tmp = temp/100;
int r, rx, ry;
parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1);
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))

View File

@@ -1301,7 +1301,7 @@ void update_particles_i(pixel *vid, int start, int inc)
}
if (ISWIRE==1)
{
for ( q = 0; q<99; q++)
for ( q = 0; q<(int)(MAX_TEMP-73.15f)/100+2; q++)
if (!wireless[q][1])
{
wireless[q][0] = 0;