mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-05 04:13:52 +00:00
[Pathing] Smoother pathing z-correction (#2982)
This commit is contained in:
parent
889e57a5af
commit
e8f1aa253a
@ -319,7 +319,6 @@ RULE_CATEGORY_END()
|
||||
RULE_CATEGORY(Map)
|
||||
RULE_BOOL(Map, FixPathingZOnSendTo, false, "Try to repair Z coordinates in the SendTo routine as well")
|
||||
RULE_BOOL(Map, FixZWhenPathing, true, "Automatically fix NPC Z coordinates when moving/pathing/engaged (Far less CPU intensive than its predecessor)")
|
||||
RULE_REAL(Map, DistanceCanTravelBeforeAdjustment, 10.0, "Distance a mob can path before FixZ is called, depends on FixZWhenPathing")
|
||||
RULE_BOOL(Map, MobZVisualDebug, false, "Displays spell effects determining whether or not NPC is hitting Best Z calcs (blue for hit, red for miss)")
|
||||
RULE_BOOL(Map, MobPathingVisualDebug, false, "Displays nodes in pathing points in realtime to help with visual debugging")
|
||||
RULE_REAL(Map, FixPathingZMaxDeltaSendTo, 20, "At runtime in SendTo: maximum change in Z to allow the BestZ code to apply")
|
||||
|
||||
@ -236,7 +236,7 @@ public:
|
||||
|
||||
if (RuleB(Map, FixZWhenPathing)) {
|
||||
m_distance_moved_since_correction += distance_moved;
|
||||
if (m_distance_moved_since_correction > RuleR(Map, DistanceCanTravelBeforeAdjustment)) {
|
||||
if (m_distance_moved_since_correction > (mob->IsEngaged() ? 1 : 10)) {
|
||||
m_distance_moved_since_correction = 0.0;
|
||||
mob->FixZ();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user