From: Alexander Monakov Date: Fri, 31 Dec 2010 01:18:22 +0000 (+0300) Subject: Simplify walljump animations X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=59d1ab59970dcc39917b4be3df6797315dca691a;p=lugaru.git Simplify walljump animations --- diff --git a/Source/Animation.def b/Source/Animation.def index 6cae283..30f2450 100644 --- a/Source/Animation.def +++ b/Source/Animation.def @@ -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) diff --git a/Source/Person.cpp b/Source/Person.cpp index 107edb4..777eab4 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -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) { diff --git a/Source/Person.h b/Source/Person.h index a4eeae9..f89da33 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -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();