mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-21 07:59:25 +02:00
final fix.
This commit is contained in:
parent
f02b6c83f8
commit
233790a430
@ -24,8 +24,8 @@ class Position;
|
|||||||
#define ANGLE_120_DEG (2.f * static_cast<float>(M_PI) / 3.f)
|
#define ANGLE_120_DEG (2.f * static_cast<float>(M_PI) / 3.f)
|
||||||
|
|
||||||
// Default acceptable path types for GeneratePath
|
// Default acceptable path types for GeneratePath
|
||||||
constexpr uint32 DEFAULT_PATH_ACCEPT_MASK = 0x01 /*PATHFIND_NORMAL*/ | 0x04 /*PATHFIND_INCOMPLETE*/;
|
constexpr uint32 DEFAULT_PATH_ACCEPT_MASK = PATHFIND_NORMAL | PATHFIND_INCOMPLETE;
|
||||||
uint32 typeOk = PATHFIND_NORMAL | PATHFIND_INCOMPLETE | PATHFIND_FARFROMPOLY;
|
constexpr uint32 RELAXED_PATH_ACCEPT_MASK = PATHFIND_NORMAL | PATHFIND_INCOMPLETE | PATHFIND_FARFROMPOLY;
|
||||||
|
|
||||||
struct PathResult
|
struct PathResult
|
||||||
{
|
{
|
||||||
|
|||||||
@ -472,7 +472,7 @@ bool NewRpgTravelFlightAction::Execute(Event /*event*/)
|
|||||||
if (bot->GetDistance(data.fromPos) > INTERACTION_DISTANCE)
|
if (bot->GetDistance(data.fromPos) > INTERACTION_DISTANCE)
|
||||||
return MoveFarTo(data.fromPos);
|
return MoveFarTo(data.fromPos);
|
||||||
|
|
||||||
Creature* flightMaster = ObjectAccessor::GetCreature(*bot, data.fromFlightMasterGuid);
|
Creature* flightMaster = ObjectAccessor::GetCreature(*bot, data.fromFlightMaster );
|
||||||
if (!flightMaster || !flightMaster->IsAlive())
|
if (!flightMaster || !flightMaster->IsAlive())
|
||||||
{
|
{
|
||||||
botAI->rpgInfo.ChangeToIdle();
|
botAI->rpgInfo.ChangeToIdle();
|
||||||
|
|||||||
@ -76,7 +76,7 @@ void NewRpgInfo::Reset()
|
|||||||
{
|
{
|
||||||
data = Idle{};
|
data = Idle{};
|
||||||
startT = getMSTime();
|
startT = getMSTime();
|
||||||
travelPlan.Reset();
|
ClearTravel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewRpgInfo::SetMoveFarTo(WorldPosition pos)
|
void NewRpgInfo::SetMoveFarTo(WorldPosition pos)
|
||||||
|
|||||||
@ -76,9 +76,10 @@ struct NewRpgInfo
|
|||||||
uint32 stuckTs{0};
|
uint32 stuckTs{0};
|
||||||
uint32 stuckAttempts{0};
|
uint32 stuckAttempts{0};
|
||||||
WorldPosition moveFarPos;
|
WorldPosition moveFarPos;
|
||||||
|
// Travel Node System
|
||||||
TravelPlan travelPlan;
|
TravelPlan travelPlan;
|
||||||
bool HasActiveTravelPlan() const { return travelPlan.IsActive(); }
|
bool HasActiveTravelPlan() const { return travelPlan.IsActive(); }
|
||||||
void ClearTravel();
|
void ClearTravel() { travelPlan.Reset(); }
|
||||||
|
|
||||||
using RpgData = std::variant<
|
using RpgData = std::variant<
|
||||||
Idle,
|
Idle,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user