mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-03 03:50:40 +00:00
[Bots] Positioning rewrite (#4856)
* [Bots] Positioning rewrite - Fixes positioning issues where bots could run back and forth or stay at the target's feet. - Adds checks to ensure bots don't spam positioning updates and complete their initial positioning. - Cleans up logic and makes it easier to read. * Cleanup
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../common/timer.h"
|
||||
#include "mob.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@@ -151,4 +152,39 @@ struct BotSpellTypesByClass {
|
||||
std::string description;
|
||||
};
|
||||
|
||||
struct CombatRangeInput {
|
||||
Mob* target;
|
||||
float target_distance;
|
||||
bool stop_melee_level;
|
||||
const EQ::ItemInstance* p_item;
|
||||
const EQ::ItemInstance* s_item;
|
||||
};
|
||||
|
||||
struct CombatRangeOutput {
|
||||
bool at_combat_range = false;
|
||||
float melee_distance_min = 0.0f;
|
||||
float melee_distance = 0.0f;
|
||||
float melee_distance_max = 0.0f;
|
||||
};
|
||||
|
||||
struct CombatPositioningInput {
|
||||
Mob* tar;
|
||||
bool stop_melee_level;
|
||||
float tar_distance;
|
||||
float melee_distance_min;
|
||||
float melee_distance;
|
||||
float melee_distance_max;
|
||||
bool behind_mob;
|
||||
bool front_mob;
|
||||
};
|
||||
|
||||
struct FindPositionInput {
|
||||
Mob* tar;
|
||||
float distance_min;
|
||||
float distance_max;
|
||||
bool behind_only;
|
||||
bool front_only;
|
||||
bool bypass_los;
|
||||
};
|
||||
|
||||
#endif // BOT_STRUCTS
|
||||
|
||||
Reference in New Issue
Block a user