Core/Objects: converted a bunch of macros to constexpr
This commit is contained in:
1 parent
41cb5dc8db
commit
070db638a5
1 file changed
+20
-20
@@ -20,27 +20,27 @@
|
|||||||
|
|
||||||
#include "Define.h"
|
#include "Define.h"
|
||||||
|
|
||||||
#define CONTACT_DISTANCE 0.5f
|
static constexpr float const CONTACT_DISTANCE = 0.5f;
|
||||||
#define INTERACTION_DISTANCE 5.0f
|
static constexpr float const INTERACTION_DISTANCE = 5.0f;
|
||||||
#define ATTACK_DISTANCE 5.0f
|
static constexpr float const ATTACK_DISTANCE = 5.0f;
|
||||||
#define INSPECT_DISTANCE 28.0f
|
static constexpr float const INSPECT_DISTANCE = 28.0f;
|
||||||
#define TRADE_DISTANCE 11.11f
|
static constexpr float const TRADE_DISTANCE = 11.11f;
|
||||||
#define MAX_VISIBILITY_DISTANCE SIZE_OF_GRIDS // max distance for visible objects
|
#define MAX_VISIBILITY_DISTANCE SIZE_OF_GRIDS // max distance for visible objects
|
||||||
#define SIGHT_RANGE_UNIT 50.0f
|
static constexpr float const SIGHT_RANGE_UNIT = 50.0f;
|
||||||
#define VISIBILITY_DISTANCE_GIGANTIC 400.0f
|
static constexpr float const VISIBILITY_DISTANCE_GIGANTIC = 400.0f;
|
||||||
#define VISIBILITY_DISTANCE_LARGE 200.0f
|
static constexpr float const VISIBILITY_DISTANCE_LARGE = 200.0f;
|
||||||
#define VISIBILITY_DISTANCE_NORMAL 100.0f
|
static constexpr float const VISIBILITY_DISTANCE_NORMAL = 100.0f;
|
||||||
#define VISIBILITY_DISTANCE_SMALL 50.0f
|
static constexpr float const VISIBILITY_DISTANCE_SMALL = 50.0f;
|
||||||
#define VISIBILITY_DISTANCE_TINY 25.0f
|
static constexpr float const VISIBILITY_DISTANCE_TINY = 25.0f;
|
||||||
#define DEFAULT_VISIBILITY_DISTANCE VISIBILITY_DISTANCE_NORMAL // default visible distance, 100 yards on continents
|
static constexpr float const DEFAULT_VISIBILITY_DISTANCE = VISIBILITY_DISTANCE_NORMAL; // default visible distance, 100 yards on continents
|
||||||
#define DEFAULT_VISIBILITY_INSTANCE 170.0f // default visible distance in instances, 170 yards
|
static constexpr float const DEFAULT_VISIBILITY_INSTANCE = 170.0f; // default visible distance in instances, 170 yards
|
||||||
#define DEFAULT_VISIBILITY_BGARENAS 533.0f // default visible distance in BG/Arenas, roughly 533 yards
|
static constexpr float const DEFAULT_VISIBILITY_BGARENAS = 533.0f; // default visible distance in BG/Arenas, roughly 533 yards
|
||||||
|
|
||||||
#define DEFAULT_PLAYER_BOUNDING_RADIUS 0.388999998569489f // player size, also currently used (correctly?) for any non Unit world objects
|
static constexpr float const DEFAULT_PLAYER_BOUNDING_RADIUS = 0.388999998569489f; // player size, also currently used (correctly?) for any non Unit world objects
|
||||||
#define DEFAULT_PLAYER_COMBAT_REACH 1.5f
|
static constexpr float const DEFAULT_PLAYER_COMBAT_REACH = 1.5f;
|
||||||
#define MIN_MELEE_REACH 2.0f
|
static constexpr float const MIN_MELEE_REACH = 2.0f;
|
||||||
#define NOMINAL_MELEE_RANGE 5.0f
|
static constexpr float const NOMINAL_MELEE_RANGE = 5.0f;
|
||||||
#define MELEE_RANGE (NOMINAL_MELEE_RANGE - MIN_MELEE_REACH * 2) //center to center for players
|
static constexpr float const MELEE_RANGE = (NOMINAL_MELEE_RANGE - MIN_MELEE_REACH * 2); //center to center for players
|
||||||
|
|
||||||
enum class VisibilityDistanceType : uint8
|
enum class VisibilityDistanceType : uint8
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user