From 6bea8f5235006eb46a045c4ce5d91ddead88f02c Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 3 Mar 2013 19:58:53 -0500 Subject: [PATCH] revert life changes, will be redone later in a faster way --- src/simulation/Simulation.cpp | 5 +++++ src/simulation/elements/LIFE.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 9861f5e1d..44932b5c6 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3537,6 +3537,7 @@ void Simulation::update_particles_i(int start, int inc) int createdsomething = 0; CGOL=0; ISGOL=0; + //TODO: maybe this should only loop through active particles for (ny=CELL; ny>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) 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++) gol2[ny][nx][z] = 0;//this improves performance A LOT compared to the memset, i was getting ~23 more fps with this. diff --git a/src/simulation/elements/LIFE.cpp b/src/simulation/elements/LIFE.cpp index a664d2f3c..89062b2c9 100644 --- a/src/simulation/elements/LIFE.cpp +++ b/src/simulation/elements/LIFE.cpp @@ -46,7 +46,7 @@ Element_LIFE::Element_LIFE() HighTemperature = ITH; HighTemperatureTransition = NT; - Update = &Element_LIFE::update; + Update = NULL;//&Element_LIFE::update; Graphics = &Element_LIFE::graphics; if(!Element_GOL_colourInit)