X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.cpp;h=cada57b293cdaa13af7c2ce55179d1cd23ff92c1;hb=2b4a9af9f7693a7715ae77f491157baac7257b10;hp=f0b00193a059cedf58339f9857d904e1745238c7;hpb=1991e81a5c3bcc9cd0d6d49f56ebd8bcbd76e7b4;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index f0b0019..cada57b 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -523,7 +523,7 @@ void Person::CheckKick() * * USES: * GameTick/doPlayerCollisions - spread fire between players - * GameTick/doDebugKeys - press f to ignite + * GameTick/doDevKeys - press f to ignite * Person::DoStuff - spread fire from lit campfires and bushes */ void Person::CatchFire() @@ -1839,7 +1839,7 @@ void Person::RagDoll(bool checkcollision) /* EFFECT */ -void Person::FootLand(bodyparts whichfoot, float opacity) +void Person::FootLand(bodypart whichfoot, float opacity) { if ((whichfoot != leftfoot) && (whichfoot != rightfoot)) { cerr << "FootLand called on wrong bodypart" << endl; @@ -4181,6 +4181,9 @@ void Person::DoAnimations() oldrot = 0; targetrot = 0; } + if (frameCurrent >= Animation::animations[animCurrent].frames.size()) { + frameCurrent = Animation::animations[animCurrent].frames.size() - 1; + } if (animCurrent != oldanimCurrent || animTarget != oldanimTarget || ((frameCurrent != oldframeCurrent || frameTarget != oldframeTarget) && !calcrot)) { //Old rotates for (int i = 0; i < skeleton.joints.size(); i++) { @@ -4234,9 +4237,6 @@ void Person::DoAnimations() } } } - if (frameCurrent >= Animation::animations[animCurrent].frames.size()) { - frameCurrent = Animation::animations[animCurrent].frames.size() - 1; - } oldanimCurrent = animCurrent; oldanimTarget = animTarget;