diff options
author | Stijn Buys <ingar@osirion.org> | 2013-01-22 21:10:29 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-01-22 21:10:29 +0000 |
commit | be1c0d9dd0fe27079f7edd89c55f5eeeff0ae00c (patch) | |
tree | 44468b31c892c08c7f30b4d7f6c7c220c5cb65fd /src/render/particlesystemscript.cc | |
parent | b887a9f9de76df999a40f2ae8994984723ac46bf (diff) |
Implemented Flare particles.
Diffstat (limited to 'src/render/particlesystemscript.cc')
-rw-r--r-- | src/render/particlesystemscript.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/render/particlesystemscript.cc b/src/render/particlesystemscript.cc index ff75093..7344aab 100644 --- a/src/render/particlesystemscript.cc +++ b/src/render/particlesystemscript.cc @@ -38,6 +38,9 @@ void ParticleSystemScript::list() case ParticleEjectorScript::Flame: strval.append(" flame"); break; + case ParticleEjectorScript::Streak: + strval.append(" streak"); + break; } } con_print << " " << script->label() << strval << " " << script->script_ejectors.size() << " " << aux::plural("ejector", script->script_ejectors.size()) << std::endl; @@ -124,6 +127,8 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label) ejector->set_type(ParticleEjectorScript::Trail); } else if (strval.compare("flame") == 0) { ejector->set_type(ParticleEjectorScript::Flame); + } else if (strval.compare("streak") == 0) { + ejector->set_type(ParticleEjectorScript::Streak); } else { inifile.unknown_value(); } @@ -152,6 +157,11 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label) ejector->set_speed(f * 0.01f); continue; + } else if (inifile.got_key_float("acceleration", f)) { + // convert speed from meters/second to game units/second + ejector->set_acceleration(f * 0.01f); + continue; + } else if (inifile.got_key_float("offset", f)) { math::clamp(f, 0.0f, 1.0f); ejector->set_offset(f); @@ -278,6 +288,9 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label) case ParticleEjectorScript::Flame: strval.append(" flame"); break; + case ParticleEjectorScript::Streak: + strval.append(" streak"); + break; } } con_debug << " " << script->label() << strval << " " << script->script_ejectors.size() << " " << aux::plural("ejector", script->script_ejectors.size()) << std::endl; |