}
}
}
- if ((damage > permanentdamage || damage > damagetolerance * .8 || deathbleeding > 0) && creature != wolftype) {
- return hurtidleanim;
+ if ((damage > permanentdamage || damage > damagetolerance * .8 || deathbleeding > 0) && PersonType::types[creature].hasAnimHurtIdle()) {
+ return PersonType::types[creature].animHurtIdle;
}
if (howactive == typesitting) {
return sitanim;
PersonType::PersonType()
{
animTalkIdle = tempanim;
+ animHurtIdle = tempanim;
}
bool PersonType::hasAnimTalkIdle()
return (animTalkIdle != tempanim);
}
+bool PersonType::hasAnimHurtIdle()
+{
+ return (animHurtIdle != tempanim);
+}
+
void PersonType::Load()
{
types.resize(2);
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;
animation_type animFightIdle;
animation_type animBounceIdle;
animation_type animTalkIdle;
+ animation_type animHurtIdle;
sound_type soundsAttack[4];
sound_type soundsTalk[2];
PersonType();
bool hasAnimTalkIdle();
+ bool hasAnimHurtIdle();
static std::vector<PersonType> types;
static void Load();