Change wifi so that it always takes one frame to transmit
This commit is contained in:
parent
6bdc05cc40
commit
a722d7a396
@ -12,6 +12,8 @@ int update_WIFI(UPDATE_FUNC_ARGS) {
|
||||
r = pmap[y+ry][x+rx];
|
||||
if (!r)
|
||||
continue;
|
||||
// wireless[][0] - whether channel is active on this frame
|
||||
// wireless[][1] - whether channel should be active on next frame
|
||||
if (wireless[parts[i].tmp][0])
|
||||
{
|
||||
if (((r&0xFF)==PT_NSCN||(r&0xFF)==PT_PSCN||(r&0xFF)==PT_INWR)&&parts[r>>8].life==0 && wireless[parts[i].tmp][0])
|
||||
@ -25,9 +27,8 @@ int update_WIFI(UPDATE_FUNC_ARGS) {
|
||||
{
|
||||
if ((r&0xFF)==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3)
|
||||
{
|
||||
wireless[parts[i].tmp][0] = 1;
|
||||
wireless[parts[i].tmp][1] = 1;
|
||||
ISWIRE = 1;
|
||||
ISWIRE = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1697,16 +1697,15 @@ void update_particles_i(pixel *vid, int start, int inc)
|
||||
GENERATION ++;
|
||||
//memset(gol2, 0, sizeof(gol2));
|
||||
}
|
||||
if (ISWIRE==1)//wifi channel reseting
|
||||
if (ISWIRE>0)//wifi channel reseting
|
||||
{
|
||||
for ( q = 0; q<(int)(MAX_TEMP-73.15f)/100+2; q++)
|
||||
if (!wireless[q][1])
|
||||
{
|
||||
wireless[q][0] = 0;
|
||||
}
|
||||
else
|
||||
wireless[q][0] = wireless[q][1];
|
||||
wireless[q][1] = 0;
|
||||
}
|
||||
ISWIRE--;
|
||||
}
|
||||
for (i=0; i<=parts_lastActiveIndex; i++)
|
||||
if (parts[i].type)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user