1
This commit is contained in:
parent
e1c8383316
commit
fd8f56d971
@ -30,6 +30,12 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
|
||||
std::string cmd = cmds[0];
|
||||
if (cmd == "gps") {
|
||||
SendDebugMsg(a8::Format("gps: %f,%f,%f", {GetPos().GetX(), GetPos().GetY(), GetPos().GetZ()}));
|
||||
} else if (cmd == "goto" && cmds.size() >= 3) {
|
||||
float x = a8::XValue(cmds[1]).GetDouble();
|
||||
float y = a8::XValue(cmds[2]).GetDouble();
|
||||
float z = a8::XValue(cmds[3]).GetDouble();
|
||||
GetMutablePos().FromGlmVec3(glm::vec3(x, y, z));
|
||||
room->grid_service->MoveCreature(this);
|
||||
} else if (cmd == "setmode") {
|
||||
if (cmds.empty()) {
|
||||
App::Instance()->UnSetFlag(20);
|
||||
|
@ -28,6 +28,14 @@ void Guide::Init(Human* owner)
|
||||
void Guide::UpdateStep()
|
||||
{
|
||||
curr_step_meta_ = mt::GuideStep::_steps.at(curr_step_idx_);
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("UpdateStep idx:%d id:%d target:%d\n",
|
||||
{
|
||||
curr_step_idx_,
|
||||
curr_step_meta_->id(),
|
||||
curr_step_meta_->target()
|
||||
});
|
||||
#endif
|
||||
owner_->room->frame_event.AddPropChg
|
||||
(
|
||||
owner_->GetWeakPtrRef(),
|
||||
@ -178,7 +186,6 @@ void Guide::ProcKillEnemy()
|
||||
if (!hero_meta){
|
||||
continue;
|
||||
}
|
||||
++i;
|
||||
context->heros.push_back(-1);
|
||||
owner_->room->xtimer.SetTimeoutEx
|
||||
(
|
||||
@ -199,6 +206,7 @@ void Guide::ProcKillEnemy()
|
||||
}
|
||||
},
|
||||
&owner_->xtimer_attacher);
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
@ -254,7 +262,6 @@ void Guide::ProcUseSkillAndKillEnemy()
|
||||
if (!hero_meta){
|
||||
continue;
|
||||
}
|
||||
++i;
|
||||
context->heros.push_back(-1);
|
||||
owner_->room->xtimer.SetTimeoutEx
|
||||
(
|
||||
@ -275,6 +282,7 @@ void Guide::ProcUseSkillAndKillEnemy()
|
||||
}
|
||||
},
|
||||
&owner_->xtimer_attacher);
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
@ -309,11 +317,6 @@ void Guide::ProcUseSkillAndKillEnemy()
|
||||
|
||||
void Guide::ProcUseSkill()
|
||||
{
|
||||
if (curr_step_meta_->_params.empty()) {
|
||||
NextStep();
|
||||
return;
|
||||
}
|
||||
|
||||
auto context = A8_MAKE_ANON_STRUCT_SHARED
|
||||
(
|
||||
std::vector<std::weak_ptr<EventHandlerPtr>> handlers;
|
||||
|
Loading…
x
Reference in New Issue
Block a user