From: Alexander Monakov Date: Fri, 31 Dec 2010 01:10:34 +0000 (+0300) Subject: Simplify land animations X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=fe7e2a8681a5988af06f7cbd24b3c8cc447b0738;p=lugaru.git Simplify land animations --- diff --git a/Source/Animation.def b/Source/Animation.def index 4c0ac35..878c832 100644 --- a/Source/Animation.def +++ b/Source/Animation.def @@ -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) diff --git a/Source/Person.cpp b/Source/Person.cpp index 30d4f47..996faea 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -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; diff --git a/Source/Person.h b/Source/Person.h index a745481..56d4f54 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -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();