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.cc13
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;