X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FPerson.cpp;h=59994f890a4284b714593c85d3130db8ed4baa82;hb=a85869d3f9d2e627781068acc2595e8fa8a6aad9;hp=421709b1ed90481b8a5f3882c26170a8821deedb;hpb=06e3212c9d53fdd7e94a49316d65eff1b0c1b1b6;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index 421709b..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())); @@ -288,6 +288,7 @@ Person::Person() : stunned(0), surprised(0), runninghowlong(0), + occluded(0), lastoccluded(0), laststanding(0), escapednum(0), @@ -302,8 +303,6 @@ Person::Person() : tempanimation(), - occluded(0), - jumpclimb(false) { } @@ -505,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 && @@ -6792,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?