diff --git a/server/gameserver/commands.cc b/server/gameserver/commands.cc index 7cb6de9f..d531c260 100644 --- a/server/gameserver/commands.cc +++ b/server/gameserver/commands.cc @@ -30,6 +30,11 @@ 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 == "info") { + SendDebugMsg(a8::Format("attack_dir: %f,%f,%f", + {GetAttackDir().x, + GetAttackDir().y, + GetAttackDir().z})); } else if (cmd == "goto" && cmds.size() >= 3) { float x = a8::XValue(cmds[1]).GetDouble(); float y = a8::XValue(cmds[2]).GetDouble(); diff --git a/server/gameserver/guide.cc b/server/gameserver/guide.cc index 3f93f3c3..f9ff5fa3 100644 --- a/server/gameserver/guide.cc +++ b/server/gameserver/guide.cc @@ -12,6 +12,8 @@ #include "mt/Hero.h" #include "mt/Skill.h" +const static glm::vec3 HERO_DEFAULT_DIR = glm::vec3(0.589955806732,0.001084076823,0.807434678078); + void Guide::Init(Human* owner) { owner_ = owner; @@ -203,13 +205,14 @@ void Guide::ProcKillEnemy() nullptr, hero_meta, pos, - pos, + HERO_DEFAULT_DIR, 666 ); if (!hero) { abort(); } hero->SetHP(0.1f); + hero->SetMaxHP(0.1f); context->heros[i] = hero->GetUniId(); } }, @@ -283,13 +286,14 @@ void Guide::ProcUseSkillAndKillEnemy() nullptr, hero_meta, pos, - pos, + HERO_DEFAULT_DIR, 666 ); if (!hero) { abort(); } hero->SetHP(0.1f); + hero->SetMaxHP(0.1f); context->heros[i] = hero->GetUniId(); } },