From: Alexander Monakov Date: Fri, 31 Dec 2010 00:38:30 +0000 (+0300) Subject: Simplify sleep animations X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=4b65ff967257d8cfd673257e464c3e3e35822ec1;p=lugaru.git Simplify sleep animations --- diff --git a/Source/Animation.def b/Source/Animation.def index 160e158..1beec10 100644 --- a/Source/Animation.def +++ b/Source/Animation.def @@ -45,7 +45,7 @@ DECLARE_ANIM(hanganim, "Hangon", lowheight, neutral, 0) DECLARE_ANIM(spinkickanim, "SpinKick", middleheight, normalattack, 0) DECLARE_ANIM(getupfromfrontanim, "GetUpFromFront", lowheight, neutral, 0) DECLARE_ANIM(getupfrombackanim, "GetUpFromBack", lowheight, neutral, 0) -DECLARE_ANIM(crouchanim, "Crouch", lowheight, neutral, 0) +DECLARE_ANIM(crouchanim, "Crouch", lowheight, neutral, ab_crouch) DECLARE_ANIM(sneakanim, "Sneak", lowheight, neutral, 0) DECLARE_ANIM(rollanim, "Roll", lowheight, neutral, 0) DECLARE_ANIM(flipanim, "Flip", highheight, neutral, 0) @@ -115,7 +115,7 @@ DECLARE_ANIM(swordfightidlebothanim, "swordfightidleboth", middleheight, neutral DECLARE_ANIM(swordslashparryanim, "sworduprightparry", middleheight, normalattack, 0) DECLARE_ANIM(swordslashparriedanim, "swordslashparried", middleheight, normalattack, 0) DECLARE_ANIM(wolfidle, "Wolfidle", middleheight, neutral, ab_idle) -DECLARE_ANIM(wolfcrouchanim, "Wolfcrouch", lowheight, neutral, 0) +DECLARE_ANIM(wolfcrouchanim, "Wolfcrouch", lowheight, neutral, ab_crouch) DECLARE_ANIM(wolflandanim, "Wolflanding", lowheight, neutral, 0) DECLARE_ANIM(wolflandhardanim, "Wolflandhard", lowheight, neutral, 0) DECLARE_ANIM(wolfrunanim, "Wolfrun", middleheight, neutral, 0) @@ -135,13 +135,13 @@ 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 | ab_sit) -DECLARE_ANIM(sleepanim, "Sleep", lowheight, neutral, ab_idle) +DECLARE_ANIM(sleepanim, "Sleep", lowheight, neutral, ab_idle | ab_sleep) DECLARE_ANIM(talkidleanim, "TalkIdle", middleheight, neutral, ab_idle) 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) -DECLARE_ANIM(dead4anim, "Dead4", lowheight, neutral, 0) +DECLARE_ANIM(dead1anim, "Dead1", lowheight, neutral, ab_sleep) +DECLARE_ANIM(dead2anim, "Dead2", lowheight, neutral, ab_sleep) +DECLARE_ANIM(dead3anim, "Dead3", lowheight, neutral, ab_sleep) +DECLARE_ANIM(dead4anim, "Dead4", lowheight, neutral, ab_sleep) DECLARE_ANIM(loadable_anim_end, "", 0, 0, 0) diff --git a/Source/Person.cpp b/Source/Person.cpp index 59aff14..3f64360 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -174,15 +174,6 @@ void Person::CatchFire(){ onfire=1; } -bool Person::isSleeping(){ - if(targetanimation==sleepanim)return 1; - if(targetanimation==dead1anim)return 1; - if(targetanimation==dead2anim)return 1; - if(targetanimation==dead3anim)return 1; - if(targetanimation==dead4anim)return 1; - else return 0; -} - int Person::getIdle(){ if(indialogue!=-1&&howactive==typeactive&&creature==rabbittype)return talkidleanim; if(hasvictim&&victim!=this/*||(id==0&&attackkeydown)*/)if(/*(id==0&&attackkeydown)||*/(!victim->dead&&victim->aitype!=passivetype&&victim->aitype!=searchtype&&aitype!=passivetype&&aitype!=searchtype&&victim->id