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

index 6cae283d12c0ff5b703f92f192881a15aaccd602..30f24509d583fbd9eee9af65c917b3770e05daa1 100644 (file)
@@ -89,12 +89,12 @@ DECLARE_ANIM(winduppunchblockedanim, "Winduppunchblocked", middleheight, normala
 DECLARE_ANIM(blockhighleftanim, "Blockhighleft", middleheight, normalattack, 0)
 DECLARE_ANIM(blockhighleftstrikeanim, "Blockhighleftstrike", middleheight, normalattack, 0)
 DECLARE_ANIM(backflipanim, "Backflip", highheight, neutral, ab_flip)
-DECLARE_ANIM(walljumpbackanim, "Walljumpback", highheight, neutral, 0)
-DECLARE_ANIM(walljumpfrontanim, "Walljumpfront", highheight, neutral, 0)
+DECLARE_ANIM(walljumpbackanim, "Walljumpback", highheight, neutral, ab_walljump)
+DECLARE_ANIM(walljumpfrontanim, "Walljumpfront", highheight, neutral, ab_walljump)
 DECLARE_ANIM(rightflipanim, "Rightflip", highheight, neutral, ab_flip)
-DECLARE_ANIM(walljumprightanim, "Walljumpright", highheight, neutral, 0)
+DECLARE_ANIM(walljumprightanim, "Walljumpright", highheight, neutral, ab_walljump)
 DECLARE_ANIM(leftflipanim, "Leftflip", highheight, neutral, ab_flip)
-DECLARE_ANIM(walljumpleftanim, "Walljumpleft", highheight, neutral, 0)
+DECLARE_ANIM(walljumpleftanim, "Walljumpleft", highheight, neutral, ab_walljump)
 DECLARE_ANIM(walljumprightkickanim, "Walljumprightkick", highheight, neutral, ab_flip)
 DECLARE_ANIM(walljumpleftkickanim, "Walljumpleftkick", highheight, neutral, ab_flip)
 DECLARE_ANIM(knifefightidleanim, "Knifefightidle", middleheight, neutral, ab_idle)
index 107edb4f436f80b8882a6943aa9bbc40017c105a..777eab41ba9639a95718b0c16d202aab3c3533c0 100644 (file)
@@ -235,12 +235,6 @@ int Person::getLandhard(){
        return 0;
 }
 
-
-bool Person::isWallJump(){
-       if(targetanimation==walljumpfrontanim||targetanimation==walljumpbackanim||targetanimation==walljumpleftanim||targetanimation==walljumprightanim)return 1;
-       else return 0;
-}
-
 static void
 SolidHitBonus(int playerid)
 {
index a4eeae9bc457c6119ad6c47e645cc12bbd2c5217..f89da335d60192ddba81dfc5fabc00d14ef2744f 100644 (file)
@@ -403,12 +403,15 @@ class Person
                }
                bool isFlip()
                {
-                 return animation_bits[targetanimation] & ab_flip;;
+                 return animation_bits[targetanimation] & ab_flip;
                }
 
                bool jumpclimb;
-               
-               bool isWallJump();
+
+               bool isWallJump()
+               {
+                 return animation_bits[targetanimation] & ab_walljump;
+               }
                void Reverse();
                void DoDamage(float howmuch);
                void DoHead();