X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.cpp;h=cada57b293cdaa13af7c2ce55179d1cd23ff92c1;hb=8a32dc9e4e1011b10f009e999d7d008aa2711d8a;hp=a9b5983919f8b45507ce5e1f364d73b23f1b5322;hpb=bb10d5d29efb774db509c87063f1294980b127c8;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index a9b5983..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() @@ -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;