修复maxhp问题

This commit is contained in:
aozhiwei 2020-03-20 17:27:37 +08:00
parent f558221358
commit f46d7dd153
2 changed files with 2 additions and 8 deletions

View File

@ -848,13 +848,6 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
dead_frameno = room->frame_no; dead_frameno = room->frame_no;
++dead_times; ++dead_times;
int max_revive_times = MetaMgr::Instance()->GetSysParamAsInt("max_revive_times", 1); int max_revive_times = MetaMgr::Instance()->GetSysParamAsInt("max_revive_times", 1);
#if 1
++max_revive_times;
#else
if (today_enter_times == 0) {
++max_revive_times;
}
#endif
if (weapon_id != VW_Spectate && if (weapon_id != VW_Spectate &&
dead_times <= max_revive_times && dead_times <= max_revive_times &&
room->AliveCount() > 2 && room->AliveCount() > 2 &&
@ -1348,7 +1341,7 @@ void Human::RecalcBaseAttr()
if (helmet_meta) { if (helmet_meta) {
ability.def += helmet_meta->i->def(); ability.def += helmet_meta->i->def();
} }
ability.max_hp = ability.hp; ability.max_hp = std::max(ability.hp, ability.max_hp);
} }
int Human::GetInventory(int slot_id) int Human::GetInventory(int slot_id)

View File

@ -133,6 +133,7 @@ void Player::UpdateMove()
void Player::UpdateShot() void Player::UpdateShot()
{ {
if (dead || if (dead ||
downed ||
room->waiting_start || room->waiting_start ||
a8::HasBitFlag(status, HS_Fly) || a8::HasBitFlag(status, HS_Fly) ||
a8::HasBitFlag(status, HS_Jump) ) { a8::HasBitFlag(status, HS_Jump) ) {