revert life changes, will be redone later in a faster way
This commit is contained in:
parent
78cdc39455
commit
6bea8f5235
@ -3537,6 +3537,7 @@ void Simulation::update_particles_i(int start, int inc)
|
|||||||
int createdsomething = 0;
|
int createdsomething = 0;
|
||||||
CGOL=0;
|
CGOL=0;
|
||||||
ISGOL=0;
|
ISGOL=0;
|
||||||
|
//TODO: maybe this should only loop through active particles
|
||||||
for (ny=CELL; ny<YRES-CELL; ny++)
|
for (ny=CELL; ny<YRES-CELL; ny++)
|
||||||
{//go through every particle and set neighbor map
|
{//go through every particle and set neighbor map
|
||||||
for (nx=CELL; nx<XRES-CELL; nx++)
|
for (nx=CELL; nx<XRES-CELL; nx++)
|
||||||
@ -3572,6 +3573,8 @@ void Simulation::update_particles_i(int start, int inc)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
parts[r>>8].tmp --;
|
parts[r>>8].tmp --;
|
||||||
|
if (parts[r>>8].tmp<=0)
|
||||||
|
parts[r>>8].type = PT_NONE;//TODO: move delete into an update function, change to kill_part
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3598,6 +3601,8 @@ void Simulation::update_particles_i(int start, int inc)
|
|||||||
if (parts[r>>8].tmp==grule[golnum][9]-1)
|
if (parts[r>>8].tmp==grule[golnum][9]-1)
|
||||||
parts[r>>8].tmp --;
|
parts[r>>8].tmp --;
|
||||||
}
|
}
|
||||||
|
if (r && parts[r>>8].tmp<=0)
|
||||||
|
parts[r>>8].type = PT_NONE;//TODO: move delete into an update function, change to kill_part
|
||||||
}
|
}
|
||||||
for ( z = 0; z<=NGOL; z++)
|
for ( z = 0; z<=NGOL; z++)
|
||||||
gol2[ny][nx][z] = 0;//this improves performance A LOT compared to the memset, i was getting ~23 more fps with this.
|
gol2[ny][nx][z] = 0;//this improves performance A LOT compared to the memset, i was getting ~23 more fps with this.
|
||||||
|
@ -46,7 +46,7 @@ Element_LIFE::Element_LIFE()
|
|||||||
HighTemperature = ITH;
|
HighTemperature = ITH;
|
||||||
HighTemperatureTransition = NT;
|
HighTemperatureTransition = NT;
|
||||||
|
|
||||||
Update = &Element_LIFE::update;
|
Update = NULL;//&Element_LIFE::update;
|
||||||
Graphics = &Element_LIFE::graphics;
|
Graphics = &Element_LIFE::graphics;
|
||||||
|
|
||||||
if(!Element_GOL_colourInit)
|
if(!Element_GOL_colourInit)
|
||||||
|
Reference in New Issue
Block a user