53 if (item.IsInherited(ItemGPS))
62 if (item.IsInherited(ItemCompass))
74 if (item.IsInherited(ItemGPS))
83 if (item.IsInherited(ItemCompass))
117 return randomizedPosition;
140 for (i = 0; i < gridXStr.
Length(); ++i)
142 gridCoordNumber = gridXStr.
Get(i).
ToInt();
145 gridCoordNumber = -1;
148 positions.Insert(gridCoordNumber);
151 for (i = 0; i < gridZStr.
Length(); ++i)
153 gridCoordNumber = gridZStr.
Get(i).
ToInt();
156 gridCoordNumber = -1;
159 positions.Insert(gridCoordNumber);
168 float altF = pEntity.GetPosition()[1];
172 for (
int i = 0; i < altString.
Length(); ++i)
174 altArray.Insert(altString.
Get(i).
ToInt());
182 vector worldPos = pEntity.GetPosition();
184 if (worldPos[0] < 0 || worldPos[0] >
GetGame().GetWorld().GetWorldSize() || worldPos[2] < 0 || worldPos[2] >
GetGame().GetWorld().GetWorldSize())
vector GetPositionRandomized()
EMapNavigationType m_NavigationType
int m_RandomPositionDeviationZ
void OnItemNotInPlayerPossession(EntityAI item)
static const string GRID_SIZE_CFG_PATH
void SetNavigationType(EMapNavigationType pType)
int m_RandomPositionDeviationX
float RandomizedDeviation()
static array< int > OrderedPositionNumbersFromGridCoords(EntityAI pEntity)
void UnsetNavigationType(EMapNavigationType pType)
static bool IsOutOfMap(EntityAI pEntity)
static array< int > OrderedAltitudeNumbersPosition(EntityAI pEntity)
void OnItemInPlayerPossession(EntityAI item)
ref array< EntityAI > m_GPSInPossessionArr
void MapNavigationBehaviour(PlayerBase pPlayer, EMapNavigationType pNavigationType=EMapNavigationType.BASIC)
static const int DISPLAY_GRID_POS_MAX_CHARS_COUNT
enum EMapNavigationType RANDOM_DEVIATION_MIN
static const int DISPLAY_ALT_MAX_CHARS_COUNT
const int RANDOM_DEVIATION_MAX
EMapNavigationType GetNavigationType()
ref array< EntityAI > m_CompassInPossessionArr
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native World GetWorld()
proto void GetGridCoords(vector pos, float gridSize, out int gridX, out int gridZ)
Translates world coordinates to a grid coordinates(map grid)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
const int INDEX_NOT_FOUND
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto int Randomize(int seed)
Sets the seed for the random number generator.
static proto int AbsInt(int i)
Returns absolute value.
static proto float Round(float f)
Returns mathematical round of value.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
proto native int Length()
Returns length of string.
proto string Get(int index)
Gets n-th character from string.
proto native int ToInt()
Converts string to integer.
proto native float GetWorldTime()