1
This commit is contained in:
parent
93bb206c07
commit
f26dea275e
@ -510,24 +510,30 @@ void Incubator::ShowHand()
|
|||||||
hum->GetMutablePos().FromGlmVec3(point);
|
hum->GetMutablePos().FromGlmVec3(point);
|
||||||
Global::Instance()->verify_set_pos = 0;
|
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);
|
room->EnableHuman(hum);
|
||||||
hum->MustBeAddBuff(hum, kTraceBuffId);
|
hum->MustBeAddBuff(hum, kTraceBuffId);
|
||||||
a8::SetBitFlag(hum->status, CS_CrazeMode);
|
a8::SetBitFlag(hum->status, CS_CrazeMode);
|
||||||
a8::SetBitFlag(hum->status, CS_DisableAttackAndroid);
|
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();
|
hold_humans_.clear();
|
||||||
#ifdef DEBUG1
|
#ifdef DEBUG1
|
||||||
room->TraversePlayerList
|
room->TraversePlayerList
|
||||||
|
@ -121,6 +121,7 @@ public:
|
|||||||
int AliveCount();
|
int AliveCount();
|
||||||
long long AliveCountChgFrameNo() { return alive_count_chged_frameno_; };
|
long long AliveCountChgFrameNo() { return alive_count_chged_frameno_; };
|
||||||
inline int RealAliveCount() { return alive_human_hash_.size(); }
|
inline int RealAliveCount() { return alive_human_hash_.size(); }
|
||||||
|
inline int GetAlivePlayerCount() { return alive_player_hash_.size(); }
|
||||||
Player* GetPlayerByAccountId(const std::string& accountid);
|
Player* GetPlayerByAccountId(const std::string& accountid);
|
||||||
Player* GetPlayerByUniId(int uniid);
|
Player* GetPlayerByUniId(int uniid);
|
||||||
Entity* GetEntityByUniId(int uniid);
|
Entity* GetEntityByUniId(int uniid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user