1
This commit is contained in:
commit
bd0dfc7d73
@ -1132,6 +1132,9 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
||||
msg.set_my_rank(0);
|
||||
}
|
||||
#endif
|
||||
if (IsPlayer()) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id,
|
||||
@ -4502,21 +4505,25 @@ void Human::InternalBeKill(int killer_id, const std::string& killer_name, int we
|
||||
SetHP(0.0f);
|
||||
KillMgr::Instance()->OnHumanDead(this, &info);
|
||||
room->frame_event.AddDead(GetWeakPtrRef(), 1000 * 15);
|
||||
dead_timer = room->xtimer.AddDeadLineTimerAndAttach
|
||||
(MetaMgr::Instance()->revive_time * SERVER_FRAME_RATE,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Human* hum = (Human*)param.sender.GetUserData();
|
||||
hum->real_dead = true;
|
||||
},
|
||||
&xtimer_attacher.timer_list_,
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Human* hum = (Human*)param.sender.GetUserData();
|
||||
hum->dead_timer = nullptr;
|
||||
});
|
||||
if (GetBattleContext()->GetReviveCoin() > 0) {
|
||||
dead_timer = room->xtimer.AddDeadLineTimerAndAttach
|
||||
(MetaMgr::Instance()->revive_time * SERVER_FRAME_RATE,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Human* hum = (Human*)param.sender.GetUserData();
|
||||
hum->real_dead = true;
|
||||
},
|
||||
&xtimer_attacher.timer_list_,
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Human* hum = (Human*)param.sender.GetUserData();
|
||||
hum->dead_timer = nullptr;
|
||||
});
|
||||
} else {
|
||||
real_dead = true;
|
||||
}
|
||||
} else {
|
||||
dead = true;
|
||||
real_dead = true;
|
||||
|
@ -14,6 +14,7 @@ namespace cs
|
||||
class MFActivePlayerData;
|
||||
class MFGasData;
|
||||
class MFPair;
|
||||
class MFSettlement;
|
||||
}
|
||||
|
||||
class Room;
|
||||
@ -76,6 +77,8 @@ class Player : public Human
|
||||
|
||||
int trace_target_uniid = 0;
|
||||
|
||||
std::shared_ptr<cs::MFSettlement> settlement;
|
||||
|
||||
::google::protobuf::RepeatedField< ::google::protobuf::int32 > interaction_objids;
|
||||
|
||||
virtual ~Player() override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user