diff options
| author | jacob1 <jfu614@gmail.com> | 2012-09-04 23:02:32 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-06 23:36:02 (GMT) |
| commit | 24b4b0b1874a0de3ec97505febd3dec9fceb580a (patch) | |
| tree | 265390ccffd657d05073796625efbcc7189ae0fc /src/simulation | |
| parent | 1391de2e3a85ad0cb8c38286e51b0708d3415a43 (diff) | |
| download | powder-24b4b0b1874a0de3ec97505febd3dec9fceb580a.zip powder-24b4b0b1874a0de3ec97505febd3dec9fceb580a.tar.gz | |
Fix bugs with energy particles in PIPE
Diffstat (limited to 'src/simulation')
| -rw-r--r-- | src/simulation/elements/PIPE.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/simulation/elements/PIPE.cpp b/src/simulation/elements/PIPE.cpp index d645a29..3d631a1 100644 --- a/src/simulation/elements/PIPE.cpp +++ b/src/simulation/elements/PIPE.cpp @@ -306,6 +306,8 @@ int Element_PIPE::graphics(GRAPHICS_FUNC_ARGS) tpart.life = cpart->tmp2; tpart.tmp = cpart->pavg[0]; tpart.ctype = cpart->pavg[1]; + if (tpart.type == PT_PHOT && tpart.ctype == 0x40000000) + tpart.ctype = 0x3FFFFFFF; t = tpart.type; if (ren->graphicscache[t].isready) { @@ -392,8 +394,13 @@ void Element_PIPE::transfer_pipe_to_part(Particle *pipe, Particle *part) part->ctype = pipe->pavg[1]; pipe->tmp &= ~0xFF; - part->vx = 0.0f; - part->vy = 0.0f; + if (part->type != PT_PHOT && part->type != PT_ELEC && part->type != PT_NEUT) + { + part->vx = 0.0f; + part->vy = 0.0f; + } + else if (part->type == PT_PHOT && part->ctype == 0x40000000) + part->ctype = 0x3FFFFFFF; part->tmp2 = 0; part->flags = 0; part->dcolour = 0; |
