]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Objects/PersonType.cpp
Moved hurtidle anim to PersonType to avoid hardcoded wolftype test
[lugaru.git] / Source / Objects / PersonType.cpp
index 0cf880c12d9bf7d36bef4111726dd582af6ef4f5..41d07c2483749444ba3f227c1ad8ac58c656bead 100644 (file)
@@ -24,6 +24,7 @@ std::vector<PersonType> PersonType::types;
 PersonType::PersonType()
 {
     animTalkIdle = tempanim;
+    animHurtIdle = tempanim;
 }
 
 bool PersonType::hasAnimTalkIdle()
@@ -31,6 +32,11 @@ bool PersonType::hasAnimTalkIdle()
     return (animTalkIdle != tempanim);
 }
 
+bool PersonType::hasAnimHurtIdle()
+{
+    return (animHurtIdle != tempanim);
+}
+
 void PersonType::Load()
 {
     types.resize(2);
@@ -99,6 +105,7 @@ void PersonType::Load()
     types[rabbittype].animFightIdle = fightidleanim;
     types[rabbittype].animBounceIdle = bounceidleanim;
     types[rabbittype].animTalkIdle = talkidleanim;
+    types[rabbittype].animHurtIdle = hurtidleanim;
 
     types[rabbittype].soundsAttack[0] = rabbitattacksound;
     types[rabbittype].soundsAttack[1] = rabbitattack2sound;