]> git.jsancho.org Git - lugaru.git/commitdiff
Simplify land animations
authorAlexander Monakov <amonakov@gmail.com>
Fri, 31 Dec 2010 01:10:34 +0000 (04:10 +0300)
committerAlexander Monakov <amonakov@gmail.com>
Fri, 31 Dec 2010 01:10:34 +0000 (04:10 +0300)
Source/Animation.def
Source/Person.cpp
Source/Person.h

index 4c0ac3542a0dd374e2f917b13b0e32079cb9e30f..878c8325bc27dbc7dea8dcca631aefebafad5279 100644 (file)
@@ -38,7 +38,7 @@ DECLARE_ANIM(bounceidleanim, "Idle", middleheight, neutral, ab_idle)
 DECLARE_ANIM(stopanim, "Stop", middleheight, neutral, ab_stop)
 DECLARE_ANIM(jumpupanim, "JumpUp", highheight, neutral, 0)
 DECLARE_ANIM(jumpdownanim, "JumpDown", highheight, neutral, 0)
-DECLARE_ANIM(landanim, "Landing", lowheight, neutral, 0)
+DECLARE_ANIM(landanim, "Landing", lowheight, neutral, ab_land)
 DECLARE_ANIM(landhardanim, "Landhard", lowheight, neutral, 0)
 DECLARE_ANIM(climbanim, "Climb", lowheight, neutral, 0)
 DECLARE_ANIM(hanganim, "Hangon", lowheight, neutral, 0)
@@ -116,7 +116,7 @@ DECLARE_ANIM(swordslashparryanim, "sworduprightparry", middleheight, normalattac
 DECLARE_ANIM(swordslashparriedanim, "swordslashparried", middleheight, normalattack, 0)
 DECLARE_ANIM(wolfidle, "Wolfidle", middleheight, neutral, ab_idle)
 DECLARE_ANIM(wolfcrouchanim, "Wolfcrouch", lowheight, neutral, ab_crouch)
-DECLARE_ANIM(wolflandanim, "Wolflanding", lowheight, neutral, 0)
+DECLARE_ANIM(wolflandanim, "Wolflanding", lowheight, neutral, ab_land)
 DECLARE_ANIM(wolflandhardanim, "Wolflandhard", lowheight, neutral, 0)
 DECLARE_ANIM(wolfrunanim, "Wolfrun", middleheight, neutral, ab_run)
 DECLARE_ANIM(wolfrunninganim, "Wolfrunning", middleheight, neutral, ab_run)
index 30d4f47aa3d6a7507d1ab690b135423237cd70da..996faea77c9ae0db7336c3e7c2f16e1a1db05453 100644 (file)
@@ -223,17 +223,6 @@ int Person::getStop(){
        return 0;
 }
 
-
-bool Person::isLanding(){
-       if(targetanimation==landanim||targetanimation==wolflandanim)return 1;
-       else return 0;
-}
-
-
-bool Person::wasLanding(){
-       if(currentanimation==landanim||currentanimation==wolflandanim)return 1;
-       else return 0;
-}
 int Person::getLanding(){
        if(creature==rabbittype)return landanim;
        if(creature==wolftype)return wolflandanim;
index a745481f4d996f7cece4b26ae5ce18fd52692f33..56d4f5490b87fe0562558594702b723037d25f97 100644 (file)
@@ -376,9 +376,15 @@ class Person
                  return animation_bits[targetanimation] & ab_run;
                }
                int getRun();
-               
-               bool wasLanding();
-               bool isLanding();
+
+               bool wasLanding()
+               {
+                 return animation_bits[currentanimation] & ab_land;
+               }
+               bool isLanding()
+               {
+                 return animation_bits[targetanimation] & ab_land;
+               }
                int getLanding();
                
                bool wasLandhard();