This commit is contained in:
aozhiwei 2019-11-01 20:16:54 +08:00
parent f4ed36059a
commit cb049f5bcd
2 changed files with 3 additions and 2 deletions

View File

@ -148,15 +148,15 @@ void Human::FillMFObjectFull(cs::MFObjectFull* full_data)
}
FillBodyState(p->mutable_states());
if (dead) {
p->set_killer_name(stats.killer_name);
p->set_killer_id(stats.killer_id);
if (real_dead){
p->set_can_revive(false);
p->set_killer_name(stats.killer_name);
} else {
p->set_can_revive(true);
int countdown = std::ceil(room->xtimer.GetRemainTime(revive_timer) / SERVER_FRAME_RATE);
countdown = std::max(0, countdown - kReviveTimeAdd);
p->set_revive_countdown(countdown);
p->set_killer_name(stats.killer_name);
}
}
}

View File

@ -201,6 +201,7 @@ message MFPlayerFull
optional bool can_revive = 30; //
optional int32 revive_countdown = 31; //
optional string killer_name = 32; //
optional int32 killer_id = 33; //id() id: -1:
}
//-