Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/helpers/Position.js
Show All 28 Lines | |||||
* @return {number[]} The id's of the entities in range of the given point. | * @return {number[]} The id's of the entities in range of the given point. | ||||
*/ | */ | ||||
PositionHelper.prototype.EntitiesNearPoint = function(origin, radius, players, iid = 0) | PositionHelper.prototype.EntitiesNearPoint = function(origin, radius, players, iid = 0) | ||||
{ | { | ||||
if (!origin || !radius || !players || !players.length) | if (!origin || !radius || !players || !players.length) | ||||
return []; | return []; | ||||
let cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager); | let cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager); | ||||
return cmpRangeManager.ExecuteQueryAroundPos(origin, 0, radius, players, iid); | return cmpRangeManager.ExecuteQueryAroundPos(origin, 0, radius, players, iid, true); | ||||
}; | }; | ||||
/** | /** | ||||
* Gives the position of the given entity, taking the lateness into account. | * Gives the position of the given entity, taking the lateness into account. | ||||
* Note that vertical movement is ignored. | * Note that vertical movement is ignored. | ||||
* | * | ||||
* @param {number} ent - Entity id of the entity we are finding the location for. | * @param {number} ent - Entity id of the entity we are finding the location for. | ||||
* @param {number} lateness - The time passed since the expected time to fire the function. | * @param {number} lateness - The time passed since the expected time to fire the function. | ||||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator