|
|
@ -23,6 +23,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include <components/misc/mathutil.hpp>
|
|
|
|
#include <components/misc/mathutil.hpp>
|
|
|
|
#include <components/misc/rng.hpp>
|
|
|
|
#include <components/misc/rng.hpp>
|
|
|
|
|
|
|
|
#include <components/misc/stringops.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
#include <components/settings/settings.hpp>
|
|
|
|
#include <components/settings/settings.hpp>
|
|
|
|
|
|
|
|
|
|
|
@ -942,14 +943,6 @@ CharacterController::~CharacterController()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
|
|
|
|
|
|
|
std::stringstream ss(s);
|
|
|
|
|
|
|
|
std::string item;
|
|
|
|
|
|
|
|
while (std::getline(ss, item, delim)) {
|
|
|
|
|
|
|
|
elems.push_back(item);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CharacterController::handleTextKey(const std::string &groupname, SceneUtil::TextKeyMap::ConstIterator key, const SceneUtil::TextKeyMap& map)
|
|
|
|
void CharacterController::handleTextKey(const std::string &groupname, SceneUtil::TextKeyMap::ConstIterator key, const SceneUtil::TextKeyMap& map)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const std::string &evt = key->second;
|
|
|
|
const std::string &evt = key->second;
|
|
|
@ -969,7 +962,7 @@ void CharacterController::handleTextKey(const std::string &groupname, SceneUtil:
|
|
|
|
if (soundgen.find(' ') != std::string::npos)
|
|
|
|
if (soundgen.find(' ') != std::string::npos)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::vector<std::string> tokens;
|
|
|
|
std::vector<std::string> tokens;
|
|
|
|
split(soundgen, ' ', tokens);
|
|
|
|
Misc::StringUtils::split(soundgen, tokens);
|
|
|
|
soundgen = tokens[0];
|
|
|
|
soundgen = tokens[0];
|
|
|
|
if (tokens.size() >= 2)
|
|
|
|
if (tokens.size() >= 2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|