1
This commit is contained in:
parent
e153d666ce
commit
4d7b86fdb2
@ -473,8 +473,8 @@ void AndroidNewAI::UpdateThinking()
|
||||
Human* hum = (Human*)owner;
|
||||
if (hum->room->GetGasData().gas_mode == GasInactive ||
|
||||
hum->room->IsWaitingStart() ||
|
||||
hum->HasBuffEffect(kBET_Jump)
|
||||
) {
|
||||
hum->HasBuffEffect(kBET_Jump) ||
|
||||
a8::HasBitFlag(hum->status, HS_DisableAttack)) {
|
||||
#if 1
|
||||
if (hum->room->IsWaitingStart()) {
|
||||
ChangeToStateNewAI(ASE_Idle);
|
||||
@ -574,7 +574,9 @@ void AndroidNewAI::UpdatePursuit()
|
||||
{
|
||||
Human* myself = (Human*)owner;
|
||||
float distance = myself->GetPos().Distance(node_.target->GetPos());
|
||||
if (distance < GetAttackRange()) {
|
||||
if (!myself->HasBuffEffect(kBET_Jump) &&
|
||||
!a8::HasBitFlag(myself->status, HS_DisableAttack) &&
|
||||
distance < GetAttackRange()) {
|
||||
ChangeToStateNewAI(ASE_Attack);
|
||||
} else {
|
||||
if (node_.exec_frame_num > 100 * 2) {
|
||||
|
@ -22,6 +22,7 @@ enum HumanStatus
|
||||
HS_AlreadyEquip = 5,
|
||||
HS_AlreadyProcNewBieLogic = 6,
|
||||
HS_LastAndroid = 7,
|
||||
HS_DisableAttack = 8,
|
||||
HS_End
|
||||
};
|
||||
|
||||
|
@ -1985,6 +1985,9 @@ void Room::NotifyGameStart()
|
||||
for (auto& pair : accountid_hash_) {
|
||||
pair.second->SendNotifyMsg(msg);
|
||||
}
|
||||
for (auto& pair : human_hash_) {
|
||||
a8::SetBitFlag(pair.second->status, HS_DisableAttack);
|
||||
}
|
||||
|
||||
waiting_start_ = true;
|
||||
xtimer.AddDeadLineTimerAndAttach
|
||||
@ -2008,6 +2011,7 @@ void Room::NotifyGameStart()
|
||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
||||
if (buff_meta) {
|
||||
for (auto& pair : room->human_hash_) {
|
||||
a8::UnSetBitFlag(pair.second->status, HS_DisableAttack);
|
||||
pair.second->AddBuff(pair.second,
|
||||
buff_meta,
|
||||
1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user