Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpRangeManager.h
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | public: | ||||
* NB: this one has no accountForSize parameter (assumed true), because we currently can only have 7 arguments for JS functions. | * NB: this one has no accountForSize parameter (assumed true), because we currently can only have 7 arguments for JS functions. | ||||
* @return unique non-zero identifier of query. | * @return unique non-zero identifier of query. | ||||
*/ | */ | ||||
virtual tag_t CreateActiveParabolicQuery(entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, entity_pos_t elevationBonus, | virtual tag_t CreateActiveParabolicQuery(entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, entity_pos_t elevationBonus, | ||||
const std::vector<int>& owners, int requiredInterface, u8 flags) = 0; | const std::vector<int>& owners, int requiredInterface, u8 flags) = 0; | ||||
/** | /** | ||||
* Get the effective range in a parablic range query. | |||||
* @param source The entity id at the origin of the query. | |||||
* @param target A target entity id. | |||||
* @param range The distance to compare terrain height with. | |||||
* @param elevationBonus Height the source gains over the target by default. | |||||
*/ | |||||
virtual entity_pos_t GetEffectiveParabolicRange(entity_id_t source, entity_id_t target, entity_pos_t range, entity_pos_t elevationBonus) const = 0; | |||||
/** | |||||
* Get the average elevation over 8 points on distance range around the entity | * Get the average elevation over 8 points on distance range around the entity | ||||
* @param id the entity id to look around | * @param id the entity id to look around | ||||
* @param range the distance to compare terrain height with | * @param range the distance to compare terrain height with | ||||
* @return a fixed number representing the average difference. It's positive when the entity is on average higher than the terrain surrounding it. | * @return a fixed number representing the average difference. It's positive when the entity is on average higher than the terrain surrounding it. | ||||
*/ | */ | ||||
virtual entity_pos_t GetElevationAdaptedRange(const CFixedVector3D& pos, const CFixedVector3D& rot, entity_pos_t range, entity_pos_t elevationBonus, entity_pos_t angle) const = 0; | virtual entity_pos_t GetElevationAdaptedRange(const CFixedVector3D& pos, const CFixedVector3D& rot, entity_pos_t range, entity_pos_t elevationBonus, entity_pos_t angle) const = 0; | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 193 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator