diff options
author | Stijn Buys <ingar@osirion.org> | 2008-08-01 20:56:47 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-08-01 20:56:47 +0000 |
commit | d2f36485dd3fbda7c9eb212ac9ffde919af5f8e1 (patch) | |
tree | c9c717afa45ea0ca251bc0e9454b7ad9c4898dbd /src/render/dust.cc | |
parent | 089cb5f96e400d4ab7c9d8041cb51eb8f118d9c1 (diff) |
revert renderer camera location, fix r_restart
Diffstat (limited to 'src/render/dust.cc')
-rw-r--r-- | src/render/dust.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/render/dust.cc b/src/render/dust.cc index d58be1b..96a9d67 100644 --- a/src/render/dust.cc +++ b/src/render/dust.cc @@ -125,18 +125,17 @@ void Dust::draw() float dsquare = 0; for (size_t j = 0; j < 3; j++) { dsquare += (core::localcontrol()->location()[j] - dust[i*3+j]) * (core::localcontrol()->location()[j] - dust[i*3+j]); - v[j] = dust[i*3+j] - Camera::eye()[j]; + v[j] = dust[i*3+j] - core::localcontrol()->state()->axis().forward()[j] * traillength; } if (dsquare > (core::localcontrol()->radius() + DUSTDISTANCE)*(core::localcontrol()->radius() + DUSTDISTANCE)) { for (size_t j = 0; j < 3; j++) { dust[i*3+j] = core::localcontrol()->location()[j] + (math::randomf(2) - 1) * (DUSTDISTANCE + core::localcontrol()->radius()); - v[j] = dust[i*3+j] - Camera::eye()[j]; + v[j] = dust[i*3+j] - core::localcontrol()->state()->axis().forward()[j] * traillength; } } - gl::vertex(v); - - v -= core::localcontrol()->state()->axis().forward() * traillength; + + glVertex3fv(&dust[i*3]); gl::vertex(v); } |