Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/particlesystemscript.cc')
-rw-r--r--src/render/particlesystemscript.cc25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/render/particlesystemscript.cc b/src/render/particlesystemscript.cc
index 2f90f1b..0fad772 100644
--- a/src/render/particlesystemscript.cc
+++ b/src/render/particlesystemscript.cc
@@ -27,10 +27,10 @@ void ParticleSystemScript::list()
switch (ejector->type()) {
case ParticleEjectorScript::Sprite:
- strval.append(" sprite");
+ strval.append(" sprites");
break;
case ParticleEjectorScript::Flare:
- strval.append(" flare");
+ strval.append(" flares");
break;
case ParticleEjectorScript::Trail:
strval.append(" trail");
@@ -39,7 +39,7 @@ void ParticleSystemScript::list()
strval.append(" flame");
break;
case ParticleEjectorScript::Streak:
- strval.append(" streak");
+ strval.append(" streaks");
break;
}
}
@@ -128,7 +128,7 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label)
} else {
inifile.unknown_error("ejector section without particles section");
}
- } else if (inifile.got_section("streak")) {
+ } else if (inifile.got_section("streaks")) {
if (script) {
ejector = script->add_ejector();
ejector->set_type(ParticleEjectorScript::Streak);
@@ -146,7 +146,7 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label)
} else if (script) {
- if (inifile.in_section("sprites") || inifile.in_section("flares") || inifile.in_section("trail") || inifile.in_section("flame") || inifile.in_section("streak")) {
+ if (inifile.in_section("sprites") || inifile.in_section("flares") || inifile.in_section("trail") || inifile.in_section("flame") || inifile.in_section("streaks")) {
if (inifile.got_key_string("cull", strval)) {
aux::to_label(strval);
@@ -171,6 +171,11 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label)
ejector->get_speed_vec() *= 0.01f;
continue;
+ } else if (inifile.got_key_vector2f_opt("tailspeed", ejector->get_tailspeed_vec())) {
+ // convert tail speed from meters/second to game units/second
+ ejector->get_tailspeed_vec() *= 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);
@@ -241,6 +246,10 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label)
ejector->set_attached(b);
continue;
+ } else if (inifile.got_key_bool("scaled", b)) {
+ ejector->set_scaled(b);
+ continue;
+
} else if (inifile.got_key_float("angle", yaw)) {
if (yaw == model::ANGLEUP) {
@@ -292,10 +301,10 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label)
switch (ejector->type()) {
case ParticleEjectorScript::Sprite:
- strval.append(" sprite");
+ strval.append(" sprites");
break;
case ParticleEjectorScript::Flare:
- strval.append(" flare");
+ strval.append(" flares");
break;
case ParticleEjectorScript::Trail:
strval.append(" trail");
@@ -304,7 +313,7 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label)
strval.append(" flame");
break;
case ParticleEjectorScript::Streak:
- strval.append(" streak");
+ strval.append(" streaks");
break;
}
}