From: Côme Chilliet Date: Sat, 10 Dec 2016 17:34:09 +0000 (+0700) Subject: Using at() instead of operator[] in currentFrame to get more precise crashes X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=commitdiff_plain;h=aa8b8b684f7c5f6edd86049eab22b5ee5bc15dbe Using at() instead of operator[] in currentFrame to get more precise crashes --- diff --git a/Source/Person.h b/Source/Person.h index ebdde32..cb62622 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -328,8 +328,8 @@ public: inline Joint& joint(int bodypart) { return skeleton.joints[skeleton.jointlabels[bodypart]]; } inline XYZ& jointPos(int bodypart) { return joint(bodypart).position; } inline XYZ& jointVel(int bodypart) { return joint(bodypart).velocity; } - inline AnimationFrame& currentFrame() { return Animation::animations[animCurrent].frames[frameCurrent]; } - inline AnimationFrame& targetFrame() { return Animation::animations[animTarget].frames[frameTarget]; } + inline AnimationFrame& currentFrame() { return Animation::animations.at(animCurrent).frames.at(frameCurrent); } + inline AnimationFrame& targetFrame() { return Animation::animations.at(animTarget).frames.at(frameTarget); } void CheckKick();