diff options
| author | Cracker64 <cracker642@gmail.com> | 2011-01-19 21:24:54 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2011-01-19 21:24:54 (GMT) |
| commit | b25a6ecd5935950322b583081889e2cc8281ea82 (patch) | |
| tree | 8b4527b7d6125e6fb7cdb0f6fa01272b8ee8d65e /src/powder.c | |
| parent | 1b35811bd4fe026ff270c25f0aaf063e3eb45dd6 (diff) | |
| download | powder-b25a6ecd5935950322b583081889e2cc8281ea82.zip powder-b25a6ecd5935950322b583081889e2cc8281ea82.tar.gz | |
some photon fixes, and better resets on reload/clear
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/powder.c b/src/powder.c index 2d9a6d0..b9fa17e 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; |
