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()
protected int m_RandomPositionDeviationX
void OnItemNotInPlayerPossession(EntityAI item)
protected void SetNavigationType(EMapNavigationType pType)
static array< int > OrderedPositionNumbersFromGridCoords(EntityAI pEntity)
protected int m_RandomPositionDeviationZ
protected float RandomizedDeviation()
static bool IsOutOfMap(EntityAI pEntity)
protected ref array< EntityAI > m_GPSInPossessionArr
protected EMapNavigationType m_NavigationType
static array< int > OrderedAltitudeNumbersPosition(EntityAI pEntity)
void OnItemInPlayerPossession(EntityAI item)
static protected const string GRID_SIZE_CFG_PATH
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
protected ref array< EntityAI > m_CompassInPossessionArr
protected void UnsetNavigationType(EMapNavigationType pType)
const int RANDOM_DEVIATION_MAX
EMapNavigationType GetNavigationType()
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 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].
static proto int AbsInt(int i)
Returns absolute value.
proto native int ToInt()
Converts string to integer.
string Get(int index)
Gets n-th character from string.
proto native int Length()
Returns length of string.
proto native float GetWorldTime()