From fcdac6a36d47d719a12f3db7a7f0a0ae59e47ef7 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Fri, 31 Dec 2010 03:34:04 +0300 Subject: [PATCH] Simplify sit animations --- Source/Animation.def | 4 ++-- Source/Person.cpp | 6 ------ Source/Person.h | 5 ++++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Source/Animation.def b/Source/Animation.def index 54dc3ad..160e158 100644 --- a/Source/Animation.def +++ b/Source/Animation.def @@ -134,10 +134,10 @@ DECLARE_ANIM(staffhitreversedanim, "StaffHitCaught", middleheight, reversed, 0) 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) +DECLARE_ANIM(sitanim, "Sit", lowheight, neutral, ab_idle | ab_sit) DECLARE_ANIM(sleepanim, "Sleep", lowheight, neutral, ab_idle) DECLARE_ANIM(talkidleanim, "TalkIdle", middleheight, neutral, ab_idle) -DECLARE_ANIM(sitwallanim, "Dying", lowheight, neutral, 0) +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) diff --git a/Source/Person.cpp b/Source/Person.cpp index 6eb59f0..59aff14 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -174,12 +174,6 @@ void Person::CatchFire(){ onfire=1; } -bool Person::isSitting(){ - if(targetanimation==sitanim)return 1; - if(targetanimation==sitwallanim)return 1; - else return 0; -} - bool Person::isSleeping(){ if(targetanimation==sleepanim)return 1; if(targetanimation==dead1anim)return 1; diff --git a/Source/Person.h b/Source/Person.h index 10f6ab2..e036f88 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -333,7 +333,10 @@ class Person } int getIdle(); - bool isSitting(); + bool isSitting() + { + return animation_bits[targetanimation] & ab_sit; + } bool isSleeping(); -- 2.39.5