AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ChaseRange Struct Reference

#include "MotionMaster.h"

Public Member Functions

 ChaseRange (float range)
 
 ChaseRange (float _minRange, float _maxRange)
 
 ChaseRange (float _minRange, float _minTolerance, float _maxTolerance, float _maxRange)
 

Public Attributes

float MinRange
 
float MinTolerance
 
float MaxRange
 
float MaxTolerance
 

Detailed Description

Constructor & Destructor Documentation

◆ ChaseRange() [1/3]

ChaseRange::ChaseRange ( float  range)
43: MinRange(range > CONTACT_DISTANCE ? 0 : range - CONTACT_DISTANCE), MinTolerance(range), MaxRange(range + CONTACT_DISTANCE), MaxTolerance(range) { }
#define CONTACT_DISTANCE
Definition: ObjectDefines.h:23
float MinRange
Definition: MotionMaster.h:90
float MaxTolerance
Definition: MotionMaster.h:93
float MinTolerance
Definition: MotionMaster.h:91
float MaxRange
Definition: MotionMaster.h:92

◆ ChaseRange() [2/3]

ChaseRange::ChaseRange ( float  _minRange,
float  _maxRange 
)
44: MinRange(_minRange), MinTolerance(std::min(_minRange + CONTACT_DISTANCE, (_minRange + _maxRange) / 2)), MaxRange(_maxRange), MaxTolerance(std::max(_maxRange - CONTACT_DISTANCE, MinTolerance)) { }

◆ ChaseRange() [3/3]

ChaseRange::ChaseRange ( float  _minRange,
float  _minTolerance,
float  _maxTolerance,
float  _maxRange 
)
45: MinRange(_minRange), MinTolerance(_minTolerance), MaxRange(_maxRange), MaxTolerance(_maxTolerance) { }

Member Data Documentation

◆ MaxRange

float ChaseRange::MaxRange

◆ MaxTolerance

float ChaseRange::MaxTolerance

◆ MinRange

float ChaseRange::MinRange

◆ MinTolerance

float ChaseRange::MinTolerance