From 52b393e9692c3a93acdb207c53dbbf5e9df13e75 Mon Sep 17 00:00:00 2001
From: Stijn Buys <ingar@osirion.org>
Date: Sun, 25 Nov 2012 21:30:16 +0000
Subject: Draw particles on projectile models.

---
 src/render/particles.cc | 2 ++
 src/render/renderext.cc | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/render/particles.cc b/src/render/particles.cc
index 4624539..6681a4f 100644
--- a/src/render/particles.cc
+++ b/src/render/particles.cc
@@ -384,6 +384,8 @@ void ParticleSystem::draw(const float elapsed)
 			if ((controlable->thrust() > 0.0f) || (controlable->state() == core::Entity::ImpulseInitiate) || (controlable->state() == core::Entity::Impulse)) {
 				ejector_active = true;
 			}
+		} else if (particlesystem_entity->type() == core::Entity::Projectile) {
+			ejector_active = true;
 		}
 	}
 
diff --git a/src/render/renderext.cc b/src/render/renderext.cc
index f8fd453..0f781c5 100644
--- a/src/render/renderext.cc
+++ b/src/render/renderext.cc
@@ -126,7 +126,7 @@ void RenderExt::frame(float elapsed)
 
 	int state = core::Entity::Normal;
 	
-	if (entity()->type() == core::Entity::Dynamic) {
+	if ((entity()->type() == core::Entity::Dynamic) || (entity()->type() == core::Entity::Projectile)) {
 
 		state = static_cast<core::EntityDynamic *>(entity())->state();
 		
-- 
cgit v1.2.3