diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-02-19 00:49:04 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-02-19 00:49:04 (GMT) |
| commit | 3702438482785414076689bfb3b8ceeaaa1fbc3a (patch) | |
| tree | 82a9ab9cada609b5d29b3fb3e3b14e462f765a25 /src | |
| parent | c960c29f7264b2a56b7aec97a1777915c8207d72 (diff) | |
| download | powder-3702438482785414076689bfb3b8ceeaaa1fbc3a.zip powder-3702438482785414076689bfb3b8ceeaaa1fbc3a.tar.gz | |
Prevent gaps in beams of photons from powered clone
Diffstat (limited to 'src')
| -rw-r--r-- | src/elements/pbcn.c | 5 | ||||
| -rw-r--r-- | src/elements/pcln.c | 5 | ||||
| -rw-r--r-- | src/powder.c | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/src/elements/pbcn.c b/src/elements/pbcn.c index 5fb361c..f8424fe 100644 --- a/src/elements/pbcn.c +++ b/src/elements/pbcn.c @@ -69,6 +69,11 @@ int update_PBCN(UPDATE_FUNC_ARGS) { { parts[r].vx = rx*3; parts[r].vy = ry*3; + if (r>i) + { + // Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced + parts[r].flags |= FLAG_SKIPMOVE; + } } } } diff --git a/src/elements/pcln.c b/src/elements/pcln.c index 1972632..924ce7a 100644 --- a/src/elements/pcln.c +++ b/src/elements/pcln.c @@ -59,6 +59,11 @@ int update_PCLN(UPDATE_FUNC_ARGS) { { parts[r].vx = rx*3; parts[r].vy = ry*3; + if (r>i) + { + // Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced + parts[r].flags |= FLAG_SKIPMOVE; + } } } } diff --git a/src/powder.c b/src/powder.c index 2f42759..c869e59 100644 --- a/src/powder.c +++ b/src/powder.c @@ -2214,6 +2214,12 @@ killed: if ((t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) { if (t == PT_PHOT) { + if (parts[i].flags&FLAG_SKIPMOVE) + { + parts[i].flags &= ~FLAG_SKIPMOVE; + continue; + } + rt = pmap[fin_y][fin_x] & 0xFF; lt = pmap[y][x] & 0xFF; |
