Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-10-20 11:58:27 +0000
committerStijn Buys <ingar@osirion.org>2013-10-20 11:58:27 +0000
commit844712beaf13127ab7e54cff1a00d87ae260d522 (patch)
tree0d3f47a4608f62d31bc118782a32e23b1ffd024b /src/render/particleejector.cc
parent55f9c240525d77686d00d43f627db7892f27e1de (diff)
Make thrust triggered particle ejectors set output particle speed depending on the current entity thrust value.
Diffstat (limited to 'src/render/particleejector.cc')
-rw-r--r--src/render/particleejector.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render/particleejector.cc b/src/render/particleejector.cc
index 5fae7d1..22ddf2d 100644
--- a/src/render/particleejector.cc
+++ b/src/render/particleejector.cc
@@ -38,7 +38,7 @@ void ParticleEjector::clear()
ejector_last_eject = 0;
}
-void ParticleEjector::frame(const float seconds, const math::Vector3f & ps_location, const math::Axis & ps_axis)
+void ParticleEjector::frame(const float seconds, const math::Vector3f & ps_location, const math::Axis & ps_axis, const float thrust_factor)
{
unsigned long now = core::application()->timestamp();
@@ -58,7 +58,7 @@ void ParticleEjector::frame(const float seconds, const math::Vector3f & ps_locat
if (!ejector_timestamp) {
ejector_timestamp = now;
}
-
+
if (!timeout() || (ejector_timestamp + timeout() > now)) {
while (ejector_last_eject > interval()) {
@@ -87,7 +87,7 @@ void ParticleEjector::frame(const float seconds, const math::Vector3f & ps_locat
particle->get_color().a = alpha_vec()[0];
particle->set_rotation(math::randomf(2.0f * M_PI));
- particle->set_speed(math::randomf(speed_vec()[0], speed_vec()[1]));
+ particle->set_speed(math::randomf(speed_vec()[0], speed_vec()[1]) * thrust_factor );
particles().push_front(particle);
if (type() == Streak) {