1
This commit is contained in:
parent
2b8d8d1993
commit
a9d42fabb3
@ -241,7 +241,7 @@ void AndroidAI::DoAttackOldAI()
|
|||||||
void AndroidAI::UpdateNewAI()
|
void AndroidAI::UpdateNewAI()
|
||||||
{
|
{
|
||||||
Human* hum = (Human*)owner;
|
Human* hum = (Human*)owner;
|
||||||
if (a8::HasBitFlag(hum->status, HS_Disable)) {
|
if (a8::HasBitFlag(hum->status, CS_Disable)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!ai_meta && GetAiLevel() != 0) {
|
if (!ai_meta && GetAiLevel() != 0) {
|
||||||
@ -306,7 +306,7 @@ void AndroidAI::UpdateThinking()
|
|||||||
if (hum->room->GetGasData().gas_mode == GasInactive ||
|
if (hum->room->GetGasData().gas_mode == GasInactive ||
|
||||||
hum->room->IsWaitingStart() ||
|
hum->room->IsWaitingStart() ||
|
||||||
hum->HasBuffEffect(kBET_Jump) ||
|
hum->HasBuffEffect(kBET_Jump) ||
|
||||||
a8::HasBitFlag(hum->status, HS_DisableAttack)) {
|
a8::HasBitFlag(hum->status, CS_DisableAttack)) {
|
||||||
if (hum->room->IsWaitingStart()) {
|
if (hum->room->IsWaitingStart()) {
|
||||||
ChangeToStateNewAI(ASE_Idle);
|
ChangeToStateNewAI(ASE_Idle);
|
||||||
} else {
|
} else {
|
||||||
@ -413,7 +413,7 @@ void AndroidAI::UpdatePursuit()
|
|||||||
if (node_->target.Get()) {
|
if (node_->target.Get()) {
|
||||||
float distance = myself->GetPos().Distance(node_->target.Get()->GetPos());
|
float distance = myself->GetPos().Distance(node_->target.Get()->GetPos());
|
||||||
if (!myself->HasBuffEffect(kBET_Jump) &&
|
if (!myself->HasBuffEffect(kBET_Jump) &&
|
||||||
!a8::HasBitFlag(myself->status, HS_DisableAttack) &&
|
!a8::HasBitFlag(myself->status, CS_DisableAttack) &&
|
||||||
distance < GetAttackRange()) {
|
distance < GetAttackRange()) {
|
||||||
ChangeToStateNewAI(ASE_Attack);
|
ChangeToStateNewAI(ASE_Attack);
|
||||||
} else {
|
} else {
|
||||||
|
@ -55,7 +55,7 @@ void Android::Update(int delta_time)
|
|||||||
|
|
||||||
void Android::InternalUpdate(int delta_time)
|
void Android::InternalUpdate(int delta_time)
|
||||||
{
|
{
|
||||||
if (a8::HasBitFlag(status, HS_Disable)) {
|
if (a8::HasBitFlag(status, CS_Disable)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (action_type != AT_None) {
|
if (action_type != AT_None) {
|
||||||
|
@ -1139,7 +1139,7 @@ bool Creature::IsProperTarget(Creature* target, bool no_teammate)
|
|||||||
if (target->dead) {
|
if (target->dead) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (a8::HasBitFlag(target->status, HS_Disable)) {
|
if (a8::HasBitFlag(target->status, CS_Disable)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!no_teammate && team_id == target->team_id) {
|
if (!no_teammate && team_id == target->team_id) {
|
||||||
|
@ -23,6 +23,14 @@ struct SkillCasterState
|
|||||||
float caster_skill_param1 = 0.0f;
|
float caster_skill_param1 = 0.0f;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum CreatureStatus
|
||||||
|
{
|
||||||
|
CS_AlreadyLordMode = 1,
|
||||||
|
CS_Disable = 2,
|
||||||
|
CS_DisableAttack = 8,
|
||||||
|
CS_End
|
||||||
|
};
|
||||||
|
|
||||||
struct xtimer_list;
|
struct xtimer_list;
|
||||||
class Skill;
|
class Skill;
|
||||||
class Obstacle;
|
class Obstacle;
|
||||||
|
@ -1133,7 +1133,7 @@ bool Human::CanUseSkill(int skill_id)
|
|||||||
void Human::DoJump()
|
void Human::DoJump()
|
||||||
{
|
{
|
||||||
if (HasBuffEffect(kBET_Fly)) {
|
if (HasBuffEffect(kBET_Fly)) {
|
||||||
a8::UnSetBitFlag(status, HS_DisableAttack);
|
a8::UnSetBitFlag(status, CS_DisableAttack);
|
||||||
RemoveBuffByEffectId(kBET_Fly);
|
RemoveBuffByEffectId(kBET_Fly);
|
||||||
MustBeAddBuff(this, kThroughWall_BUFFID);
|
MustBeAddBuff(this, kThroughWall_BUFFID);
|
||||||
MustBeAddBuff(this, JUMP_BUFFID);
|
MustBeAddBuff(this, JUMP_BUFFID);
|
||||||
@ -1278,7 +1278,7 @@ void Human::OnGridListChange(std::set<GridCell*>& old_grids,
|
|||||||
void Human::SyncAroundPlayers(const char* file, int line, const char* func)
|
void Human::SyncAroundPlayers(const char* file, int line, const char* func)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
if (a8::HasBitFlag(status, HS_Disable)) {
|
if (a8::HasBitFlag(status, CS_Disable)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1497,7 +1497,7 @@ void Human::RemoveObserver(Human* observer)
|
|||||||
|
|
||||||
void Human::SendUpdateMsg()
|
void Human::SendUpdateMsg()
|
||||||
{
|
{
|
||||||
if (!follow_target_ && !a8::HasBitFlag(status, HS_Disable) && IsPlayer()) {
|
if (!follow_target_ && !a8::HasBitFlag(status, CS_Disable) && IsPlayer()) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
long long begin_tick = a8::XGetTickCount();
|
long long begin_tick = a8::XGetTickCount();
|
||||||
long long end_tick = a8::XGetTickCount();
|
long long end_tick = a8::XGetTickCount();
|
||||||
@ -1947,7 +1947,7 @@ void Human::ClearFrameData()
|
|||||||
new_objects.clear();
|
new_objects.clear();
|
||||||
}
|
}
|
||||||
if (!del_objects.empty()) {
|
if (!del_objects.empty()) {
|
||||||
if (!a8::HasBitFlag(status, HS_Disable)) {
|
if (!a8::HasBitFlag(status, CS_Disable)) {
|
||||||
for (auto& itr : del_objects) {
|
for (auto& itr : del_objects) {
|
||||||
Entity* entity = room->GetEntityByUniId(itr);
|
Entity* entity = room->GetEntityByUniId(itr);
|
||||||
if (entity) {
|
if (entity) {
|
||||||
@ -1965,7 +1965,7 @@ void Human::ClearFrameData()
|
|||||||
del_objects.clear();
|
del_objects.clear();
|
||||||
}
|
}
|
||||||
if (!out_objects.empty()) {
|
if (!out_objects.empty()) {
|
||||||
if (!a8::HasBitFlag(status, HS_Disable)) {
|
if (!a8::HasBitFlag(status, CS_Disable)) {
|
||||||
for (auto& itr : out_objects) {
|
for (auto& itr : out_objects) {
|
||||||
Entity* entity = room->GetEntityByUniId(itr);
|
Entity* entity = room->GetEntityByUniId(itr);
|
||||||
if (entity) {
|
if (entity) {
|
||||||
@ -2823,7 +2823,7 @@ void Human::AdjustDecHp(float old_health, float& new_health)
|
|||||||
|
|
||||||
void Human::OnEnable()
|
void Human::OnEnable()
|
||||||
{
|
{
|
||||||
a8::UnSetBitFlag(status, HS_Disable);
|
a8::UnSetBitFlag(status, CS_Disable);
|
||||||
enable_frameno = room->GetFrameNo();
|
enable_frameno = room->GetFrameNo();
|
||||||
room->grid_service->MoveCreature(this);
|
room->grid_service->MoveCreature(this);
|
||||||
FindLocation();
|
FindLocation();
|
||||||
@ -2832,7 +2832,7 @@ void Human::OnEnable()
|
|||||||
|
|
||||||
void Human::OnDisable()
|
void Human::OnDisable()
|
||||||
{
|
{
|
||||||
a8::SetBitFlag(status, HS_Disable);
|
a8::SetBitFlag(status, CS_Disable);
|
||||||
RemoveFromScene();
|
RemoveFromScene();
|
||||||
ClearFrameData();
|
ClearFrameData();
|
||||||
ClearPartObjects();
|
ClearPartObjects();
|
||||||
|
@ -13,14 +13,6 @@ namespace MetaData
|
|||||||
struct SkillPhase;
|
struct SkillPhase;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum HumanStatus
|
|
||||||
{
|
|
||||||
HS_AlreadyLordMode = 1,
|
|
||||||
HS_Disable = 2,
|
|
||||||
HS_DisableAttack = 8,
|
|
||||||
HS_End
|
|
||||||
};
|
|
||||||
|
|
||||||
struct PartObject
|
struct PartObject
|
||||||
{
|
{
|
||||||
int entity_uniid = 0;
|
int entity_uniid = 0;
|
||||||
|
@ -617,3 +617,8 @@ bool Obstacle::DoInteraction(Human* sender)
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Obstacle::OnCollisionTrigger(Creature* c)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -45,6 +45,7 @@ class Obstacle : public Entity
|
|||||||
virtual bool CanThroughable(Creature* c);
|
virtual bool CanThroughable(Creature* c);
|
||||||
virtual bool CanThroughable(Bullet* bullet);
|
virtual bool CanThroughable(Bullet* bullet);
|
||||||
virtual bool DoInteraction(Human* sender);
|
virtual bool DoInteraction(Human* sender);
|
||||||
|
virtual void OnCollisionTrigger(Creature* c);
|
||||||
void Explosion(Bullet* bullet);
|
void Explosion(Bullet* bullet);
|
||||||
void SetDoorInfo(Building* building, int door_id_x);
|
void SetDoorInfo(Building* building, int door_id_x);
|
||||||
bool IsDoor();
|
bool IsDoor();
|
||||||
|
@ -1373,7 +1373,7 @@ void Player::_CMAdStart(f8::MsgHdr& hdr, const cs::CMAdStart& msg)
|
|||||||
if (GetBuffByEffectId(kBET_AdPlaying)) {
|
if (GetBuffByEffectId(kBET_AdPlaying)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (a8::HasBitFlag(status, HS_AlreadyLordMode)) {
|
if (a8::HasBitFlag(status, CS_AlreadyLordMode)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ad_timer_) {
|
if (ad_timer_) {
|
||||||
@ -1507,7 +1507,7 @@ void Player::InternalAdCancel()
|
|||||||
|
|
||||||
void Player::InternalAdOk()
|
void Player::InternalAdOk()
|
||||||
{
|
{
|
||||||
if (a8::HasBitFlag(status, HS_AlreadyLordMode)) {
|
if (a8::HasBitFlag(status, CS_AlreadyLordMode)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(ADPLAY_BUFFID);
|
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(ADPLAY_BUFFID);
|
||||||
@ -1519,7 +1519,7 @@ void Player::InternalAdOk()
|
|||||||
lord_buff_meta = MetaMgr::Instance()->GetBuff(buff_meta->param2);
|
lord_buff_meta = MetaMgr::Instance()->GetBuff(buff_meta->param2);
|
||||||
}
|
}
|
||||||
if (lord_buff_meta) {
|
if (lord_buff_meta) {
|
||||||
a8::SetBitFlag(status, HS_AlreadyLordMode);
|
a8::SetBitFlag(status, CS_AlreadyLordMode);
|
||||||
AddBuff(this, lord_buff_meta, 1);
|
AddBuff(this, lord_buff_meta, 1);
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(lord_buff_meta->i->buff_param1(), strings, ':');
|
a8::Split(lord_buff_meta->i->buff_param1(), strings, ':');
|
||||||
|
@ -314,7 +314,7 @@ void Room::ShowAndroid(Human* target, int num)
|
|||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
Human* hum = pair.second;
|
Human* hum = pair.second;
|
||||||
if (hum->IsAndroid() &&
|
if (hum->IsAndroid() &&
|
||||||
a8::HasBitFlag(hum->status, HS_Disable)) {
|
a8::HasBitFlag(hum->status, CS_Disable)) {
|
||||||
if (hum->born_point) {
|
if (hum->born_point) {
|
||||||
DecBornPointHumanNum(hum->born_point, hum);
|
DecBornPointHumanNum(hum->born_point, hum);
|
||||||
}
|
}
|
||||||
@ -370,7 +370,7 @@ void Room::CreateAndroid(int robot_num)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!CanAddToScene(hum)) {
|
if (!CanAddToScene(hum)) {
|
||||||
a8::SetBitFlag(hum->status, HS_Disable);
|
a8::SetBitFlag(hum->status, CS_Disable);
|
||||||
} else {
|
} else {
|
||||||
AddToAliveHumanHash(hum);
|
AddToAliveHumanHash(hum);
|
||||||
AddToMoveableHash(hum);
|
AddToMoveableHash(hum);
|
||||||
@ -401,7 +401,7 @@ Human* Room::FindEnemy(Human* hum)
|
|||||||
if (!huma->dead &&
|
if (!huma->dead &&
|
||||||
huma->IsAndroid() &&
|
huma->IsAndroid() &&
|
||||||
hum->team_id != huma->team_id &&
|
hum->team_id != huma->team_id &&
|
||||||
!a8::HasBitFlag(huma->status, HS_Disable)) {
|
!a8::HasBitFlag(huma->status, CS_Disable)) {
|
||||||
if (!target) {
|
if (!target) {
|
||||||
target = huma;
|
target = huma;
|
||||||
} else {
|
} else {
|
||||||
@ -1238,7 +1238,7 @@ void Room::UpdateGas()
|
|||||||
}
|
}
|
||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
if (pair.second->real_dead ||
|
if (pair.second->real_dead ||
|
||||||
a8::HasBitFlag(pair.second->status, HS_Disable)) {
|
a8::HasBitFlag(pair.second->status, CS_Disable)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bool b1 = a8::CircleContainCircle(gas_data_.pos_old,
|
bool b1 = a8::CircleContainCircle(gas_data_.pos_old,
|
||||||
@ -2289,7 +2289,7 @@ void Room::SecondRandPoint()
|
|||||||
tmp_humans.reserve(GetRoomMaxPlayerNum());
|
tmp_humans.reserve(GetRoomMaxPlayerNum());
|
||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
if (pair.second->IsAndroid() &&
|
if (pair.second->IsAndroid() &&
|
||||||
a8::HasBitFlag(pair.second->status, HS_Disable) &&
|
a8::HasBitFlag(pair.second->status, CS_Disable) &&
|
||||||
pair.second->team_uuid.empty()
|
pair.second->team_uuid.empty()
|
||||||
) {
|
) {
|
||||||
tmp_humans.push_back(pair.second);
|
tmp_humans.push_back(pair.second);
|
||||||
@ -2337,7 +2337,7 @@ void Room::NotifyGameStart()
|
|||||||
pair.second->SendNotifyMsg(msg);
|
pair.second->SendNotifyMsg(msg);
|
||||||
}
|
}
|
||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
a8::SetBitFlag(pair.second->status, HS_DisableAttack);
|
a8::SetBitFlag(pair.second->status, CS_DisableAttack);
|
||||||
}
|
}
|
||||||
|
|
||||||
waiting_start_ = true;
|
waiting_start_ = true;
|
||||||
@ -2359,7 +2359,7 @@ void Room::NotifyGameStart()
|
|||||||
{
|
{
|
||||||
Room* room = (Room*)param.sender.GetUserData();
|
Room* room = (Room*)param.sender.GetUserData();
|
||||||
for (auto& pair : room->human_hash_) {
|
for (auto& pair : room->human_hash_) {
|
||||||
a8::UnSetBitFlag(pair.second->status, HS_DisableAttack);
|
a8::UnSetBitFlag(pair.second->status, CS_DisableAttack);
|
||||||
for (int buff_id : room->map_meta_->buff_list) {
|
for (int buff_id : room->map_meta_->buff_list) {
|
||||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
||||||
if (buff_meta) {
|
if (buff_meta) {
|
||||||
@ -2460,7 +2460,7 @@ void Room::EnableHuman(Human* target)
|
|||||||
AddToAliveHumanHash(target);
|
AddToAliveHumanHash(target);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (a8::HasBitFlag(target->status, HS_Disable)) {
|
if (a8::HasBitFlag(target->status, CS_Disable)) {
|
||||||
target->OnEnable();
|
target->OnEnable();
|
||||||
AddToMoveableHash(target);
|
AddToMoveableHash(target);
|
||||||
if (!target->real_dead) {
|
if (!target->real_dead) {
|
||||||
@ -2490,7 +2490,7 @@ void Room::DisableHuman(Human* target)
|
|||||||
target->GetUniId()
|
target->GetUniId()
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
if (!a8::HasBitFlag(target->status, HS_Disable)) {
|
if (!a8::HasBitFlag(target->status, CS_Disable)) {
|
||||||
target->OnDisable();
|
target->OnDisable();
|
||||||
RemoveFromMoveableHash(target);
|
RemoveFromMoveableHash(target);
|
||||||
RemoveFromAliveHumanHash(target);
|
RemoveFromAliveHumanHash(target);
|
||||||
@ -2731,7 +2731,7 @@ void Room::ProcDieAndroid(int die_time, int die_num)
|
|||||||
hum->BeKill(VP_SafeArea,
|
hum->BeKill(VP_SafeArea,
|
||||||
TEXT("battle_server_killer_gas", "毒圈"),
|
TEXT("battle_server_killer_gas", "毒圈"),
|
||||||
VW_SafeArea);
|
VW_SafeArea);
|
||||||
a8::UnSetBitFlag(hum->status, HS_Disable);
|
a8::UnSetBitFlag(hum->status, CS_Disable);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2754,7 +2754,7 @@ void Room::ProcDieAndroid(int die_time, int die_num)
|
|||||||
hum->BeKill(killer->GetUniId(),
|
hum->BeKill(killer->GetUniId(),
|
||||||
killer->name,
|
killer->name,
|
||||||
killer->GetCurrWeapon()->weapon_id);
|
killer->GetCurrWeapon()->weapon_id);
|
||||||
a8::UnSetBitFlag(hum->status, HS_Disable);
|
a8::UnSetBitFlag(hum->status, CS_Disable);
|
||||||
} else {
|
} else {
|
||||||
hum->BeKill(VP_SafeArea,
|
hum->BeKill(VP_SafeArea,
|
||||||
TEXT("battle_server_killer_gas", "毒圈"),
|
TEXT("battle_server_killer_gas", "毒圈"),
|
||||||
@ -2763,7 +2763,7 @@ void Room::ProcDieAndroid(int die_time, int die_num)
|
|||||||
alive_humans.erase(alive_humans.begin() + i);
|
alive_humans.erase(alive_humans.begin() + i);
|
||||||
alive_humans_copy.erase(alive_humans_copy.begin() + i);
|
alive_humans_copy.erase(alive_humans_copy.begin() + i);
|
||||||
}
|
}
|
||||||
a8::UnSetBitFlag(hum->status, HS_Disable);
|
a8::UnSetBitFlag(hum->status, CS_Disable);
|
||||||
}
|
}
|
||||||
++dead_num;
|
++dead_num;
|
||||||
break;
|
break;
|
||||||
@ -2816,12 +2816,12 @@ void Room::CheckAutoDie(Human* target,
|
|||||||
GetAliveHumans(alive_humans, 5, target);
|
GetAliveHumans(alive_humans, 5, target);
|
||||||
if (!alive_humans.empty()) {
|
if (!alive_humans.empty()) {
|
||||||
Human* killer = alive_humans[rand() % alive_humans.size()];
|
Human* killer = alive_humans[rand() % alive_humans.size()];
|
||||||
a8::UnSetBitFlag(target->status, HS_Disable);
|
a8::UnSetBitFlag(target->status, CS_Disable);
|
||||||
target->BeKill(killer->GetUniId(),
|
target->BeKill(killer->GetUniId(),
|
||||||
killer->name,
|
killer->name,
|
||||||
killer->GetCurrWeapon()->weapon_id);
|
killer->GetCurrWeapon()->weapon_id);
|
||||||
} else {
|
} else {
|
||||||
a8::UnSetBitFlag(target->status, HS_Disable);
|
a8::UnSetBitFlag(target->status, CS_Disable);
|
||||||
target->BeKill(VP_SafeArea,
|
target->BeKill(VP_SafeArea,
|
||||||
TEXT("battle_server_killer_gas", "毒圈"),
|
TEXT("battle_server_killer_gas", "毒圈"),
|
||||||
VW_SafeArea);
|
VW_SafeArea);
|
||||||
@ -2846,7 +2846,7 @@ void Room::ProcDisableHuman()
|
|||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
if (pair.second->IsAndroid() &&
|
if (pair.second->IsAndroid() &&
|
||||||
pair.second->team_uuid.empty() &&
|
pair.second->team_uuid.empty() &&
|
||||||
!a8::HasBitFlag(pair.second->status, HS_Disable)) {
|
!a8::HasBitFlag(pair.second->status, CS_Disable)) {
|
||||||
DisableHuman(pair.second);
|
DisableHuman(pair.second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2855,7 +2855,7 @@ void Room::ProcDisableHuman()
|
|||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
if (pair.second->IsAndroid() &&
|
if (pair.second->IsAndroid() &&
|
||||||
pair.second->team_uuid.empty() &&
|
pair.second->team_uuid.empty() &&
|
||||||
!a8::HasBitFlag(pair.second->status, HS_Disable)) {
|
!a8::HasBitFlag(pair.second->status, CS_Disable)) {
|
||||||
DisableHuman(pair.second);
|
DisableHuman(pair.second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2882,7 +2882,7 @@ void Room::ShuaGridRound(Human* target)
|
|||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
Human* hum = pair.second;
|
Human* hum = pair.second;
|
||||||
if (hum->IsAndroid() &&
|
if (hum->IsAndroid() &&
|
||||||
a8::HasBitFlag(hum->status, HS_Disable) &&
|
a8::HasBitFlag(hum->status, CS_Disable) &&
|
||||||
!hum->real_dead &&
|
!hum->real_dead &&
|
||||||
hum->team_uuid.empty() &&
|
hum->team_uuid.empty() &&
|
||||||
grid_service->InView(target->GetGridId(), hum->GetPos().x, hum->GetPos().y)
|
grid_service->InView(target->GetGridId(), hum->GetPos().x, hum->GetPos().y)
|
||||||
@ -2948,8 +2948,8 @@ void Room::CheckPartObjects(Human* testa, Human* testb)
|
|||||||
(huma == testb && humb == testa)) {
|
(huma == testb && humb == testa)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (a8::HasBitFlag(huma->status, HS_Disable) ||
|
if (a8::HasBitFlag(huma->status, CS_Disable) ||
|
||||||
a8::HasBitFlag(humb->status, HS_Disable) ||
|
a8::HasBitFlag(humb->status, CS_Disable) ||
|
||||||
huma->GetPartObjectsCount() <= 0
|
huma->GetPartObjectsCount() <= 0
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
@ -2994,7 +2994,7 @@ void Room::CheckAliveHuman(Human* hum, std::vector<Human*>& alive_humans)
|
|||||||
if (hum->IsAndroid() &&
|
if (hum->IsAndroid() &&
|
||||||
!hum->real_dead &&
|
!hum->real_dead &&
|
||||||
hum->team_uuid.empty() &&
|
hum->team_uuid.empty() &&
|
||||||
a8::HasBitFlag(hum->status, HS_Disable) &&
|
a8::HasBitFlag(hum->status, CS_Disable) &&
|
||||||
!HasPlayerInRound(hum->GetPos(), VIEW_RANGE)) {
|
!HasPlayerInRound(hum->GetPos(), VIEW_RANGE)) {
|
||||||
alive_humans.push_back(hum);
|
alive_humans.push_back(hum);
|
||||||
}
|
}
|
||||||
@ -3335,7 +3335,7 @@ void Room::GetCanEnableAndroids(std::vector<Human*>& humans, size_t num)
|
|||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
if (pair.second->IsAndroid() &&
|
if (pair.second->IsAndroid() &&
|
||||||
!pair.second->real_dead &&
|
!pair.second->real_dead &&
|
||||||
a8::HasBitFlag(pair.second->status, HS_Disable)
|
a8::HasBitFlag(pair.second->status, CS_Disable)
|
||||||
) {
|
) {
|
||||||
if (humans.size() >= num) {
|
if (humans.size() >= num) {
|
||||||
break;
|
break;
|
||||||
@ -3557,7 +3557,7 @@ void Room::ShuaLastGas()
|
|||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
Human* hum = pair.second;
|
Human* hum = pair.second;
|
||||||
if (hum->IsAndroid() &&
|
if (hum->IsAndroid() &&
|
||||||
a8::HasBitFlag(hum->status, HS_Disable) &&
|
a8::HasBitFlag(hum->status, CS_Disable) &&
|
||||||
!hum->real_dead &&
|
!hum->real_dead &&
|
||||||
hum->team_uuid.empty()
|
hum->team_uuid.empty()
|
||||||
) {
|
) {
|
||||||
|
@ -78,7 +78,7 @@ void Team::CombineBornPoint()
|
|||||||
} else {
|
} else {
|
||||||
member->SetPos(member->born_point->RandPoint());
|
member->SetPos(member->born_point->RandPoint());
|
||||||
}
|
}
|
||||||
if (!a8::HasBitFlag(member->status, HS_Disable)) {
|
if (!a8::HasBitFlag(member->status, CS_Disable)) {
|
||||||
member->FindLocation();
|
member->FindLocation();
|
||||||
member->RefreshView();
|
member->RefreshView();
|
||||||
room->grid_service->MoveCreature(member);
|
room->grid_service->MoveCreature(member);
|
||||||
|
@ -87,7 +87,7 @@ float ZombieModeAI::GetAttackRate()
|
|||||||
void ZombieModeAI::UpdateAI()
|
void ZombieModeAI::UpdateAI()
|
||||||
{
|
{
|
||||||
Human* hum = (Human*)owner;
|
Human* hum = (Human*)owner;
|
||||||
if (a8::HasBitFlag(hum->status, HS_Disable)) {
|
if (a8::HasBitFlag(hum->status, CS_Disable)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!node_->ai_meta && GetAiLevel() != 0) {
|
if (!node_->ai_meta && GetAiLevel() != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user