X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.cpp;h=59994f890a4284b714593c85d3130db8ed4baa82;hb=a85869d3f9d2e627781068acc2595e8fa8a6aad9;hp=71c0660c2926d45cb9663818af1911277b374384;hpb=0010abfd8f9ce65ce3fad7c5f8c2da4f9aedbe94;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index 71c0660..59994f8 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -25,6 +25,8 @@ along with Lugaru. If not, see . #include "Sounds.h" #include "Awards.h" #include "Game.h" +#include "Dialog.h" +#include "Utils/Folders.h" extern float multiplier; extern Terrain terrain; @@ -65,8 +67,6 @@ extern float damagedealt; extern int hostile; extern float hostiletime; -extern int indialogue; - extern bool gamestarted; std::vector> Person::players(1, std::shared_ptr(new Person())); @@ -504,7 +504,7 @@ void Person::CatchFire() */ int Person::getIdle() { - if (indialogue != -1 && howactive == typeactive && creature == rabbittype) + if (Dialog::inDialog() && (howactive == typeactive) && (creature == rabbittype)) return talkidleanim; if (hasvictim && (victim != this->shared_from_this())/*||(id==0&&attackkeydown)*/) if (/*(id==0&&attackkeydown)||*/(!victim->dead && victim->aitype != passivetype && @@ -6791,7 +6791,7 @@ bool Person::addClothes(const int& clothesId) //Load Image ImageRec texture; - bool opened = load_image(fileName, texture); + bool opened = load_image(Folders::getResourcePath(fileName).c_str(), texture); float alphanum; //Is it valid?