From 59d1ab59970dcc39917b4be3df6797315dca691a Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Fri, 31 Dec 2010 04:18:22 +0300 Subject: [PATCH] Simplify walljump animations --- Source/Animation.def | 8 ++++---- Source/Person.cpp | 6 ------ Source/Person.h | 9 ++++++--- 3 files changed, 10 insertions(+), 13 deletions(-) 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(); -- 2.39.2