修复换装备满血问题

This commit is contained in:
aozhiwei 2020-03-06 19:30:41 +08:00
parent 34e1dd72ab
commit 7e36000453

View File

@ -68,6 +68,7 @@ void Human::Initialize()
RecalcSelfCollider(); RecalcSelfCollider();
volume_ = meta->volume; volume_ = meta->volume;
observers_.insert(this); observers_.insert(this);
ability.hp = meta->i->health();
} }
float Human::GetSpeed() float Human::GetSpeed()
@ -1343,7 +1344,6 @@ void Human::RecalcBaseAttr()
if (helmet_meta) { if (helmet_meta) {
ability.def += helmet_meta->i->def(); ability.def += helmet_meta->i->def();
} }
ability.hp = meta->i->health();
ability.max_hp = ability.hp; ability.max_hp = ability.hp;
} }