1
This commit is contained in:
parent
93bb206c07
commit
f26dea275e
@ -510,24 +510,30 @@ void Incubator::ShowHand()
|
||||
hum->GetMutablePos().FromGlmVec3(point);
|
||||
Global::Instance()->verify_set_pos = 0;
|
||||
|
||||
room->xtimer.SetTimeoutEx
|
||||
(
|
||||
SERVER_FRAME_RATE * 20,
|
||||
[hum] (int event, const a8::Args* args)
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
#if 0
|
||||
a8::UnSetBitFlag(hum->status, CS_DisableAttackAndroid);
|
||||
#endif
|
||||
}
|
||||
},
|
||||
&hum->xtimer_attacher);
|
||||
|
||||
room->EnableHuman(hum);
|
||||
hum->MustBeAddBuff(hum, kTraceBuffId);
|
||||
a8::SetBitFlag(hum->status, CS_CrazeMode);
|
||||
a8::SetBitFlag(hum->status, CS_DisableAttackAndroid);
|
||||
}
|
||||
room->xtimer.SetIntervalEx
|
||||
(
|
||||
SERVER_FRAME_RATE,
|
||||
[room = room] (int event, const a8::Args* args) mutable
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
if (!room->IsGameOver() && room->GetAlivePlayerCount() <= 0) {
|
||||
room->TraverseHumanList
|
||||
(
|
||||
[] (Huamn* hum)
|
||||
{
|
||||
a8::UnSetBitFlag(hum->status, CS_DisableAttackAndroid);
|
||||
return true;
|
||||
});
|
||||
room->xtimer.DeleteCurrentTimer();
|
||||
}
|
||||
}
|
||||
},
|
||||
&room->xtimer_attacher_);
|
||||
hold_humans_.clear();
|
||||
#ifdef DEBUG1
|
||||
room->TraversePlayerList
|
||||
|
@ -121,6 +121,7 @@ public:
|
||||
int AliveCount();
|
||||
long long AliveCountChgFrameNo() { return alive_count_chged_frameno_; };
|
||||
inline int RealAliveCount() { return alive_human_hash_.size(); }
|
||||
inline int GetAlivePlayerCount() { return alive_player_hash_.size(); }
|
||||
Player* GetPlayerByAccountId(const std::string& accountid);
|
||||
Player* GetPlayerByUniId(int uniid);
|
||||
Entity* GetEntityByUniId(int uniid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user