1
This commit is contained in:
parent
7b6eda38bd
commit
1e7b83be9a
@ -555,6 +555,12 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
|||||||
});
|
});
|
||||||
room->xtimer.ModifyTime(room->moba_over_timer, 0);
|
room->xtimer.ModifyTime(room->moba_over_timer, 0);
|
||||||
}
|
}
|
||||||
|
} else if (cmd == "peace_mode" && cmds.size() >= 0) {
|
||||||
|
if (cmds[1] == "1") {
|
||||||
|
room->OpenRoomSwitch(kRoomSwitchPeaceMode);
|
||||||
|
} else {
|
||||||
|
room->CloseRoomSwitch(kRoomSwitchPeaceMode);
|
||||||
|
}
|
||||||
} else if (cmd == "findpath" && cmds.size() >= 3) {
|
} else if (cmd == "findpath" && cmds.size() >= 3) {
|
||||||
float x = a8::XValue(cmds[1]).GetDouble();
|
float x = a8::XValue(cmds[1]).GetDouble();
|
||||||
float y = a8::XValue(cmds[2]).GetDouble();
|
float y = a8::XValue(cmds[2]).GetDouble();
|
||||||
|
@ -396,6 +396,12 @@ bool HeroAgent::MasterInRange(float range)
|
|||||||
|
|
||||||
behaviac::EBTStatus HeroAgent::SearchEnemy(float range)
|
behaviac::EBTStatus HeroAgent::SearchEnemy(float range)
|
||||||
{
|
{
|
||||||
|
#ifdef MYDEBUG
|
||||||
|
if (owner_->room->HasRoomSwitch(kRoomSwitchPeaceMode)
|
||||||
|
) {
|
||||||
|
return behaviac::BT_FAILURE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
Creature* myself = owner_;
|
Creature* myself = owner_;
|
||||||
Creature* target = nullptr;
|
Creature* target = nullptr;
|
||||||
float last_distance = range + 1;
|
float last_distance = range + 1;
|
||||||
@ -435,6 +441,12 @@ behaviac::EBTStatus HeroAgent::SearchEnemy(float range)
|
|||||||
|
|
||||||
behaviac::EBTStatus HeroAgent::SearchHumanEnemy(float range)
|
behaviac::EBTStatus HeroAgent::SearchHumanEnemy(float range)
|
||||||
{
|
{
|
||||||
|
#ifdef MYDEBUG
|
||||||
|
if (owner_->room->HasRoomSwitch(kRoomSwitchPeaceMode)
|
||||||
|
) {
|
||||||
|
return behaviac::BT_FAILURE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
Creature* myself = owner_;
|
Creature* myself = owner_;
|
||||||
Creature* target = nullptr;
|
Creature* target = nullptr;
|
||||||
float last_distance = range + 1;
|
float last_distance = range + 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user