]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Person.h
Using at() instead of operator[] in currentFrame to get more precise crashes
[lugaru.git] / Source / Person.h
index 21768a4f2494ea64fea340c33cea7ed62349fc1e..cb62622f0710f4984aa2e846e5797cde223dd139 100644 (file)
@@ -328,6 +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.at(animCurrent).frames.at(frameCurrent); }
+    inline AnimationFrame& targetFrame() { return Animation::animations.at(animTarget).frames.at(frameTarget); }
 
 
     void CheckKick();
@@ -384,7 +386,7 @@ public:
     int SphereCheck(XYZ *p1, float radius, XYZ *p, XYZ *move, float *rotate, Model *model);
     int DrawSkeleton();
     void Puff(int whichlabel);
-    void FootLand(bodyparts whichfoot, float opacity);
+    void FootLand(bodypart whichfoot, float opacity);
     void DoStuff();
     void setAnimation(int);
     void DoAnimations();