diff options
| author | cracker64 <cracker642@gmail.com> | 2013-03-03 21:32:11 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2013-03-03 21:32:11 (GMT) |
| commit | 2be0b222111240cca189288a6a6da2141c5a8a2f (patch) | |
| tree | 835779268f34c8feb870960fe5a9390e34c2525c /src/simulation/Simulation.cpp | |
| parent | 5e1c7d7932aead512549bacb6fa8847da2530e9f (diff) | |
| parent | cca1898ee8c2091833661f97748defb298cc77b9 (diff) | |
| download | powder-2be0b222111240cca189288a6a6da2141c5a8a2f.zip powder-2be0b222111240cca189288a6a6da2141c5a8a2f.tar.gz | |
Merge branch 'master' of git@github.com:FacialTurd/The-Powder-Toy.git
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index d64ccf7..ef3c3d9 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2947,10 +2947,10 @@ int Simulation::create_part(int p, int x, int y, int tv) parts[i].life = 75; break; /*Testing - case PT_WOOD: - parts[i].life = 150; - break; - End Testing*/ + case PT_WOOD: + parts[i].life = 150; + break; + End Testing*/ case PT_WARP: parts[i].life = rand()%95+70; break; @@ -3555,7 +3555,7 @@ void Simulation::update_particles_i(int start, int inc) { golnum = parts[r>>8].ctype+1; if (golnum<=0 || golnum>NGOLALT) { - parts[r>>8].type = PT_NONE; + kill_part(r>>8); continue; } if (parts[r>>8].tmp == grule[golnum][9]-1) { @@ -3575,7 +3575,7 @@ void Simulation::update_particles_i(int start, int inc) } else { parts[r>>8].tmp --; if (parts[r>>8].tmp<=0) - parts[r>>8].type = PT_NONE;//using kill_part makes it not work + kill_part(r>>8); } } //} @@ -3604,7 +3604,7 @@ void Simulation::update_particles_i(int start, int inc) parts[r>>8].tmp --; } if (r && parts[r>>8].tmp<=0) - parts[r>>8].type = PT_NONE;//using kill_part makes it not work + kill_part(r>>8); } 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. |
