Pyrogenesis  trunk
Classes | Namespaces | Macros | Functions | Variables
CCmpUnitMotion.h File Reference
#include "simulation2/system/Component.h"
#include "ICmpUnitMotion.h"
#include "simulation2/components/CCmpUnitMotionManager.h"
#include "simulation2/components/ICmpObstruction.h"
#include "simulation2/components/ICmpObstructionManager.h"
#include "simulation2/components/ICmpOwnership.h"
#include "simulation2/components/ICmpPosition.h"
#include "simulation2/components/ICmpPathfinder.h"
#include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/components/ICmpValueModificationManager.h"
#include "simulation2/components/ICmpVisual.h"
#include "simulation2/helpers/Geometry.h"
#include "simulation2/helpers/Render.h"
#include "simulation2/MessageTypes.h"
#include "simulation2/serialization/SerializedPathfinder.h"
#include "simulation2/serialization/SerializedTypes.h"
#include "graphics/Overlay.h"
#include "maths/FixedVector2D.h"
#include "ps/CLogger.h"
#include "ps/Profile.h"
#include "renderer/Scene.h"
#include <algorithm>
Include dependency graph for CCmpUnitMotion.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CCmpUnitMotion
 
struct  CCmpUnitMotion::Ticket
 
struct  CCmpUnitMotion::MoveRequest
 

Namespaces

 anonymous_namespace{CCmpUnitMotion.h}
 

Macros

#define DISABLE_PATHFINDER   0
 

Functions

const CColor anonymous_namespace{CCmpUnitMotion.h}::OVERLAY_COLOR_LONG_PATH (1, 1, 1, 1)
 
const CColor anonymous_namespace{CCmpUnitMotion.h}::OVERLAY_COLOR_SHORT_PATH (1, 0, 0, 1)
 

Variables

constexpr entity_pos_t anonymous_namespace{CCmpUnitMotion.h}::SHORT_PATH_MIN_SEARCH_RANGE = entity_pos_t::FromInt(12 * Pathfinding::NAVCELL_SIZE_INT)
 Min/Max range to restrict short path queries to. More...
 
constexpr entity_pos_t anonymous_namespace{CCmpUnitMotion.h}::SHORT_PATH_MAX_SEARCH_RANGE = entity_pos_t::FromInt(56 * Pathfinding::NAVCELL_SIZE_INT)
 
constexpr entity_pos_t anonymous_namespace{CCmpUnitMotion.h}::SHORT_PATH_SEARCH_RANGE_INCREMENT = entity_pos_t::FromInt(4 * Pathfinding::NAVCELL_SIZE_INT)
 
constexpr u8 anonymous_namespace{CCmpUnitMotion.h}::SHORT_PATH_SEARCH_RANGE_INCREASE_DELAY = 1
 
constexpr entity_pos_t anonymous_namespace{CCmpUnitMotion.h}::SHORT_PATH_LONG_WAYPOINT_RANGE = entity_pos_t::FromInt(4 * Pathfinding::NAVCELL_SIZE_INT)
 When using the short-pathfinder to rejoin a long-path waypoint, aim for a circle of this radius around the waypoint. More...
 
constexpr entity_pos_t anonymous_namespace{CCmpUnitMotion.h}::LONG_PATH_MIN_DIST = entity_pos_t::FromInt(16 * Pathfinding::NAVCELL_SIZE_INT)
 Minimum distance to goal for a long path request. More...
 
constexpr entity_pos_t anonymous_namespace{CCmpUnitMotion.h}::DIRECT_PATH_RANGE = entity_pos_t::FromInt(24 * Pathfinding::NAVCELL_SIZE_INT)
 If we are this close to our target entity/point, then think about heading for it in a straight line instead of pathfinding. More...
 
constexpr entity_pos_t anonymous_namespace{CCmpUnitMotion.h}::TARGET_UNCERTAINTY_MULTIPLIER = entity_pos_t::FromInt(8 * Pathfinding::NAVCELL_SIZE_INT)
 To avoid recomputing paths too often, have some leeway for target range checks based on our distance to the target. More...
 
constexpr u8 anonymous_namespace{CCmpUnitMotion.h}::KNOWN_IMPERFECT_PATH_RESET_COUNTDOWN = 12
 When following a known imperfect path (i.e. More...
 
constexpr u8 anonymous_namespace{CCmpUnitMotion.h}::MAX_FAILED_MOVEMENTS = 35
 When we fail to move this many turns in a row, inform other components that the move will fail. More...
 
constexpr u8 anonymous_namespace{CCmpUnitMotion.h}::ALTERNATE_PATH_TYPE_DELAY = 3
 When computing paths but failing to move, we want to occasionally alternate pathfinder systems to avoid getting stuck (the short pathfinder can unstuck the long-range one and vice-versa, depending). More...
 
constexpr u8 anonymous_namespace{CCmpUnitMotion.h}::ALTERNATE_PATH_TYPE_EVERY = 6
 
constexpr u8 anonymous_namespace{CCmpUnitMotion.h}::BACKUP_HACK_DELAY = 10
 Units can occasionally get stuck near corners. More...
 
constexpr u8 anonymous_namespace{CCmpUnitMotion.h}::VERY_OBSTRUCTED_THRESHOLD = 10
 After this many failed computations, start sending "VERY_OBSTRUCTED" messages instead. More...
 

Macro Definition Documentation

◆ DISABLE_PATHFINDER

#define DISABLE_PATHFINDER   0