]> git.jsancho.org Git - lugaru.git/commitdiff
Using at() instead of operator[] in currentFrame to get more precise crashes
authorCôme Chilliet <come@chilliet.eu>
Sat, 10 Dec 2016 17:34:09 +0000 (00:34 +0700)
committerCôme Chilliet <come@chilliet.eu>
Sat, 10 Dec 2016 17:34:09 +0000 (00:34 +0700)
Source/Person.h

index ebdde320af4f487e1784ac8ecb80084db61278ff..cb62622f0710f4984aa2e846e5797cde223dd139 100644 (file)
@@ -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();