修复 结算问题

This commit is contained in:
aozhiwei 2020-03-31 16:56:13 +08:00
parent 56655f41fb
commit 0697a62beb
3 changed files with 15 additions and 8 deletions

View File

@ -2957,3 +2957,15 @@ void Human::AutoChgWeapon()
curr_weapon = &weapons[0];
}
}
void Human::CancelRevive()
{
if (dead && revive_timer && !real_dead) {
dead = true;
real_dead = true;
downed = false;
FreeDownedTimer();
OnDie();
FreeReviveTimer();
}
}

View File

@ -250,6 +250,7 @@ protected:
Buff* GetBuffById(int buff_id);
void ProcSkillPhase(MetaData::SkillPhase* phase);
void AutoChgWeapon();
void CancelRevive();
private:
void ClearFrameData();

View File

@ -1103,6 +1103,7 @@ void Player::_CMVoice(f8::MsgHdr& hdr, const cs::CMVoice& msg)
void Player::_CMGameOver(f8::MsgHdr& hdr, const cs::CMGameOver& msg)
{
CancelRevive();
SendGameOver();
}
@ -1161,12 +1162,5 @@ void Player::_CMRevive(f8::MsgHdr& hdr, const cs::CMRevive& msg)
void Player::_CMCancelRevive(f8::MsgHdr& hdr, const cs::CMCancelRevive& msg)
{
if (dead && revive_timer && !real_dead) {
dead = true;
real_dead = true;
downed = false;
FreeDownedTimer();
OnDie();
FreeReviveTimer();
}
CancelRevive();
}