X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=blobdiff_plain;f=Source%2FObjects%2FPerson.cpp;h=874194b4a53419537c177aaf15352f9bf65002dd;hp=85341867ff47754986f6f3caccf750d3ddb073e0;hb=475fb97fd19a8bc2c58c603d0bc5dcf8cc63b40d;hpb=eae73ddd7a006ee6de9ffb01f3ec5f8e5fdc6d85 diff --git a/Source/Objects/Person.cpp b/Source/Objects/Person.cpp index 8534186..874194b 100644 --- a/Source/Objects/Person.cpp +++ b/Source/Objects/Person.cpp @@ -565,8 +565,8 @@ int Person::getIdle() { 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 && + if (hasvictim && (victim != this->shared_from_this())) { + if ((!victim->dead && victim->aitype != passivetype && victim->aitype != searchtype && aitype != passivetype && aitype != searchtype && victim->id < Person::players.size())) { if ((aitype == playercontrolled && stunned <= 0 && weaponactive == -1) || pause) { @@ -588,6 +588,7 @@ int Person::getIdle() if (aitype != playercontrolled && stunned <= 0 && creature != wolftype && !pause) return fightsidestep; } + } if ((damage > permanentdamage || damage > damagetolerance * .8 || deathbleeding > 0) && creature != wolftype) return hurtidleanim; if (howactive == typesitting) return sitanim;