diff options
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/powder.c b/src/powder.c index 2d9a6d0..27b48fa 100644 --- a/src/powder.c +++ b/src/powder.c @@ -583,8 +583,6 @@ inline int create_part(int p, int x, int y, int t) } } } - if(photons[y][x] && t==PT_PHOT) - return -1; if(pfree == -1) return -1; i = pfree; @@ -876,6 +874,7 @@ static void create_gain_photon(int pp) parts[i].vy = parts[pp].vy; parts[i].temp = parts[pmap[ny][nx] >> 8].temp; parts[i].tmp = 0; + photons[ny][nx] = PT_PHOT|(i<<8); temp_bin = (int)((parts[i].temp-273.0f)*0.25f); if(temp_bin < 0) temp_bin = 0; @@ -911,6 +910,7 @@ static void create_cherenkov_photon(int pp) parts[i].y = parts[pp].y; parts[i].temp = parts[pmap[ny][nx] >> 8].temp; parts[i].tmp = 0; + photons[ny][nx] = PT_PHOT|(i<<8); if(lr) { parts[i].vx = parts[pp].vx - 2.5f*parts[pp].vy; @@ -1112,7 +1112,7 @@ int nearest_part(int ci, int t) void update_particles_i(pixel *vid, int start, int inc) { - int i, j, x, y, t, nx, ny, r, a, s, lt, rt, fe, nt, lpv, nearp, pavg, nnx, nny, q, golnum, goldelete, z, ctype, temp, trade, docontinue, nxx, nyy, nxi, nyi; + int i, j, x, y, t, nx, ny, r, a, s, lt, rt, fe, nt, lpv, nearp, pavg, nnx, nny, q, golnum, goldelete, z, ctype, temp, trade, docontinue, nxx, nyy, nxi, nyi, neighbors; float mv, dx, dy, ix, iy, lx, ly, d, pp, nrx, nry, dp, rr, rrr; float nn, ct1, ct2; float pt = R_TEMP; @@ -1308,7 +1308,7 @@ void update_particles_i(pixel *vid, int start, int inc) for(ny=CELL;ny<YRES-CELL;ny++) { r = pmap[ny][nx]; - int neighbors = gol2[nx][ny][0]; + neighbors = gol2[nx][ny][0]; if(neighbors==0 || !(ptypes[r&0xFF].properties&PROP_LIFE || !r&0xFF) || (r>>8)>=NPART) continue; for( golnum = 1;golnum<NGOL;golnum++) |
