1
This commit is contained in:
parent
75b60a46ba
commit
6c0c60f289
@ -246,24 +246,6 @@ void Player::UpdateAction()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AT_Relive:
|
|
||||||
{
|
|
||||||
Entity* entity = room->GetEntityByUniId(action_target_id);
|
|
||||||
if (entity->entity_type != ET_Player) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Human* hum = (Human*)entity;
|
|
||||||
if (!hum->dead && hum->downed) {
|
|
||||||
hum->health = MetaMgr::Instance()->GetSysParamAsInt("downed_relive_recover_hp");
|
|
||||||
hum->downed = false;
|
|
||||||
if (hum->downed_timer) {
|
|
||||||
room->xtimer.DeleteTimer(hum->downed_timer);
|
|
||||||
hum->downed_timer = nullptr;
|
|
||||||
}
|
|
||||||
SyncAroundPlayers();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -271,6 +253,24 @@ void Player::UpdateAction()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case AT_Relive:
|
||||||
|
{
|
||||||
|
Entity* entity = room->GetEntityByUniId(action_target_id);
|
||||||
|
if (entity->entity_type != ET_Player) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Human* hum = (Human*)entity;
|
||||||
|
if (!hum->dead && hum->downed) {
|
||||||
|
hum->health = MetaMgr::Instance()->GetSysParamAsInt("downed_relive_recover_hp");
|
||||||
|
hum->downed = false;
|
||||||
|
if (hum->downed_timer) {
|
||||||
|
room->xtimer.DeleteTimer(hum->downed_timer);
|
||||||
|
hum->downed_timer = nullptr;
|
||||||
|
}
|
||||||
|
SyncAroundPlayers();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
ResetAction();
|
ResetAction();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user