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

index 54dc3adcb5082e89cf51f9d39ae39193ee8331aa..160e1585decc1aafe7ebbdf2a38225369cfe739a 100644 (file)
@@ -134,10 +134,10 @@ DECLARE_ANIM(staffhitreversedanim, "StaffHitCaught", middleheight, reversed, 0)
 DECLARE_ANIM(staffhitreversalanim, "StaffHitCatch", middleheight, reversal, 0)
 DECLARE_ANIM(staffspinhitreversedanim, "SpinWhackCaught", middleheight, reversed, 0)
 DECLARE_ANIM(staffspinhitreversalanim, "SpinWhackCatch", middleheight, reversal, 0)
-DECLARE_ANIM(sitanim, "Sit", lowheight, neutral, ab_idle)
+DECLARE_ANIM(sitanim, "Sit", lowheight, neutral, ab_idle | ab_sit)
 DECLARE_ANIM(sleepanim, "Sleep", lowheight, neutral, ab_idle)
 DECLARE_ANIM(talkidleanim, "TalkIdle", middleheight, neutral, ab_idle)
-DECLARE_ANIM(sitwallanim, "Dying", lowheight, neutral, 0)
+DECLARE_ANIM(sitwallanim, "Dying", lowheight, neutral, ab_sit)
 DECLARE_ANIM(dead1anim, "Dead1", lowheight, neutral, 0)
 DECLARE_ANIM(dead2anim, "Dead2", lowheight, neutral, 0)
 DECLARE_ANIM(dead3anim, "Dead3", lowheight, neutral, 0)
index 6eb59f04a07e1b240bcf49a60399160a5a3773ad..59aff14683b26d6ab2d05a07094d2ce1cfa1468b 100644 (file)
@@ -174,12 +174,6 @@ void Person::CatchFire(){
        onfire=1;
 }
 
-bool Person::isSitting(){
-       if(targetanimation==sitanim)return 1;
-       if(targetanimation==sitwallanim)return 1;
-       else return 0;
-}
-
 bool Person::isSleeping(){
        if(targetanimation==sleepanim)return 1;
        if(targetanimation==dead1anim)return 1;
index 10f6ab2808d96779aac7119e180fc870109957b0..e036f884925199ebb57583b0470c7fdced4a620a 100644 (file)
@@ -333,7 +333,10 @@ class Person
                }
                int getIdle();
                
-               bool isSitting();
+               bool isSitting()
+               {
+                 return animation_bits[targetanimation] & ab_sit;
+               }
                bool isSleeping();