From b8082e83ce7d4aa808899cb28aa3153359a33f34 Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Fri, 12 Mar 2010 04:00:51 +0000 Subject: [PATCH] fixed bug with rotating particles(x-offset was inverted before ) + lots of new particle related data --- source/shared_lib/sources/graphics/particle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/shared_lib/sources/graphics/particle.cpp b/source/shared_lib/sources/graphics/particle.cpp index 8a3a1e165..5be00b9a9 100644 --- a/source/shared_lib/sources/graphics/particle.cpp +++ b/source/shared_lib/sources/graphics/particle.cpp @@ -391,8 +391,8 @@ void UnitParticleSystem::initParticle(Particle *p, int particleIndex){ else {// rotate it according to rotation float rad=degToRad(rotation); - p->pos= Vec3f(pos.x+x+offset.z*sinf(rad)-offset.x*cosf(rad), pos.y+random.randRange(-radius/2, radius/2)+offset.y, pos.z+y+(offset.z*cosf(rad)+offset.x*sinf(rad))); - p->speed=Vec3f(p->speed.z*sinf(rad)-p->speed.x*cosf(rad),p->speed.y,(p->speed.z*cosf(rad)+p->speed.x*sinf(rad))); + p->pos= Vec3f(pos.x+x+offset.z*sinf(rad)+offset.x*cosf(rad), pos.y+random.randRange(-radius/2, radius/2)+offset.y, pos.z+y+(offset.z*cosf(rad)-offset.x*sinf(rad))); + p->speed=Vec3f(p->speed.z*sinf(rad)+p->speed.x*cosf(rad),p->speed.y,(p->speed.z*cosf(rad)-p->speed.x*sinf(rad))); } }