X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.h;h=7f8364e49ce0dc69ab6e0cd8a7aa83a7a5192204;hb=38d21f685e669429419970d4bb7e7c806592e131;hp=754a046676763e5f138798723124659e11fdad68;hpb=320a287705c0463c6f8943ad9cf4c407c556f703;p=lugaru.git diff --git a/Source/Person.h b/Source/Person.h index 754a046..7f8364e 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -326,10 +326,11 @@ public: - // convenience - Joint& joint(int); - XYZ& jointPos(int); - XYZ& jointVel(int); + // convenience functions + 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; } + void CheckKick(); void CatchFire(); @@ -394,4 +395,5 @@ public: const int maxplayers = 10; extern Person player[maxplayers]; + #endif