This commit is contained in:
aozhiwei 2022-11-22 11:42:10 +08:00
parent 2d3160023b
commit 9125634376
2 changed files with 3 additions and 2 deletions

View File

@ -4677,8 +4677,8 @@ void Human::InternalBeKill(int killer_id, const std::string& killer_name, int we
downed = false; downed = false;
SetHP(0.0f); SetHP(0.0f);
KillMgr::Instance()->OnHumanDead(this, &info); KillMgr::Instance()->OnHumanDead(this, &info);
room->frame_event.AddDead(GetWeakPtrRef(), 1000 * 15);
if (GetBattleContext()->GetReviveCoin() > 0) { if (GetBattleContext()->GetReviveCoin() > 0) {
room->frame_event.AddDead(GetWeakPtrRef(), 1000 * MetaMgr::Instance()->revive_time);
dead_timer = room->xtimer.AddDeadLineTimerAndAttach dead_timer = room->xtimer.AddDeadLineTimerAndAttach
(MetaMgr::Instance()->revive_time * SERVER_FRAME_RATE, (MetaMgr::Instance()->revive_time * SERVER_FRAME_RATE,
a8::XParams() a8::XParams()
@ -4695,6 +4695,7 @@ void Human::InternalBeKill(int killer_id, const std::string& killer_name, int we
hum->dead_timer = nullptr; hum->dead_timer = nullptr;
}); });
} else { } else {
room->frame_event.AddDead(GetWeakPtrRef(), 0);
real_dead = true; real_dead = true;
} }
} else { } else {

View File

@ -1501,7 +1501,7 @@ void Player::InternalRevive(int target_uniid, int revive_coin)
if (room->IsGameOver()) { if (room->IsGameOver()) {
return; return;
} }
if (dead) { if (!dead) {
return; return;
} }
GetBattleContext()->SetReviveCoin(revive_coin); GetBattleContext()->SetReviveCoin(revive_coin);