added getting translated text from msg

This commit is contained in:
Pawel Kolodziejski 2004-03-20 09:38:33 +00:00
parent 5021ccc1b7
commit 8694e346ac

View File

@ -20,6 +20,7 @@
#include "engine.h"
#include "costume.h"
#include "sound.h"
#include "localize.h"
#include <cmath>
#include <cstring>
#include "driver_gl.h"
@ -117,7 +118,8 @@ void Actor::sayLine(const char *msg) {
return;
if (talkSound_) // Only once line at a time, please :)
shutUp();
std::string msgId(msg + 1, secondSlash);
std::string msgText = Localizer::instance()->localize(secondSlash + 1);
std::string msgId(msg + 1, secondSlash);
talkSound_ = ResourceLoader::instance()->loadSound((msgId + ".wav").c_str());
if (talkSound_ != NULL)
Mixer::instance()->playVoice(talkSound_);