|
static bool | IsScope2DEnabled () |
|
static string | GetPlatformName (PlatformKind kind) |
|
static string | GetProfileName () |
|
static vector | FixVector180 (vector vec) |
| Fixes the angles in the input vector to be be between -180 and 180.
|
|
static vector | GetVectorClampedToWorldBounds (vector pos) |
| Clamps input vector to within world bounds.
|
|
static bool | GetIntersectPointPlane (vector start, vector end, out vector result, float height) |
| Returns the intersect point between 2 points and a height.
|
|
static void | GetDistForHUD (float dist, bool imperial, out string tgtDist, out string distFormat) |
| Fills the 2 out strings with distance in the appropriate unit and unit of measurement.
|
|
static bool | FilterCallback_IgnoreNotInList (notnull IEntity target) |
| Trace filter callback function - ignores all but for the objects in the g_TraceFilterList list.
|
|
static bool | FilterCallback_IgnoreCharactersWithChildren (notnull IEntity target) |
| Trace filter callback function - ignores characters and their children.
|
|
static bool | FilterCallback_IgnoreCharacters (notnull IEntity target) |
| Trace filter callback function - ignores characters.
|
|
static bool | FilterCallback_IgnoreEntityWithChildren (notnull IEntity target, vector rayorigin, vector raydirection) |
| Trace filter callback function - ignores g_TraceFilterEnt and its children.
|
|
static bool | FilterCallback_IgnoreAllButEntityWithChildren (notnull IEntity target, vector rayorigin, vector raydirection) |
| Trace filter callback function - ignores all BUT g_TraceFilterEnt and its children.
|
|
static bool | FilterCallback_IgnoreAllButEntity (notnull IEntity target, vector rayorigin, vector raydirection) |
| Trace filter callback function - ignores all BUT g_TraceFilterEnt.
|
|
static bool | FilterCallback_IgnoreAllButMeleeAttackable (notnull IEntity target, vector rayorigin, vector raydirection) |
| Trace filter callback function - ignores all BUT Characters/Trees TODO:
|
|
static bool | FilterCallback_IgnoreAllButBuildingRegions (notnull IEntity target, vector rayorigin, vector raydirection) |
| Trace filter callback function - ignores all but building regions type.
|
|
static float | GetScaledStructuralDamage (float damage, EDamageType type) |
| Scales damage to structural components by damage type and returns final value.
|
|
static int | GetChildIndex (IEntity ent) |
| Returns child index for the input child entity, returns -1 if not found.
|
|
static array< ref ParamEnum > | GetBonesAsParamEnums (IEntity entity) |
| Creates array of ParamEnums filled with pairs of bones names and their indexes in the EntityTagsComponent.
|
|
static void | SetEntityAsChildToParent (IEntity parent, IEntity child) |
| Sets the input child entity as a child of the input parent entity, handling adjustments of transformations.
|
|
static vector | ScaleVectorByVector (vector inputVec, vector scaleVec) |
| Returns a scaled vector by scaling each axis separately.
|
|
static float | GetGlobalYawForMat (vector mat[4]) |
| Returns global yaw orientation for input matrix.
|
|
static void | LerpMatrix (vector mat1[4], vector mat2[4], out vector matOut[4], float pct) |
|
static void | GetLocalMatrix (vector parentMat[4], vector childMat[4]) |
| Returns local matrix of input matrices.
|
|
static void | GetWorldBoundsForEntity (vector mat[4], out vector mins, out vector maxs) |
| Returns world bounds from input matrix and bounds.
|
|
static void | GetWorldBoundsWithChildren (IEntity entity, out vector min, out vector max, bool isChild=false) |
| Get world bounds of whole entity hierarchy, i.e., of itself and all its children.
|
|
static bool | GetObjectAtOffsetFromObject (IEntity parent, IEntity child, vector localPos, vector localAng, float tolerancePos, float toleranceAng) |
| Returns whether object 1 is at the desired position in object 2.
|
|
static bool | IntersectBoxPoint (vector pos, vector mins, vector maxs) |
| Returns whether input point is within bounds.
|
|
static bool | IntersectBoxSphere (vector center, float radius, vector mins, vector maxs, out float intersectDist=0) |
| Returns whether input sphere intersects with bounds with optional intersection distance output (negative values are within the box)
|
|
static float | FractionOf (float input, float fracOf) |
| Limit float between -1 and 1.
|
|
static float | ClampToGrid (float input, float grid) |
| Clamp value to a grid size.
|
|
static vector | GetDirectionAngles (vector viewMat[4], vector posTo) |
| Returns relative yaw/pitch/roll to position from input view matrix.
|
|
static float | fmod (float dividend, float divisor) |
| Takes two floats and returns the remainder after division.
|
|
static void | WorldClampMatrixWithinBounds (vector mat[4], vector mins, vector maxs) |
| Takes input matrix and keeps it within the input bounds.
|
|
static int | VectorToRGBA255 (vector colorVec, float alpha) |
| Return full color using input vector for color and input alpha (0 - 255)
|
|
static void | WorldClampObjectAndMatrixWithinBounds (GenericEntity ent, vector mat[4], vector mins, vector maxs, vector gridSize) |
| Takes input object and matrix and keeps it within the input bounds and optional gridsnap.
|
|
static void | LocalClampObjectAndMatrixWithinBounds (vector localMat[4], GenericEntity ent, vector origMat[4], vector localMins, vector localMaxs, vector gridSize) |
| Takes input object and matrix and keeps it within the input bounds and optional gridsnap.
|
|
static void | WorldSnapMatrix (vector mat[4], vector gridSize) |
| Take the input matrix and snaps the rotation to 90 degree, world-oriented angles. Also snaps the position to the input grid size.
|
|
static void | LocalSnapMatrix (vector localMat[4], vector origMat[4], vector gridSize) |
| Take the input matrix and snaps the rotation to 90 degree, local-oriented angles. Also snaps the position to the input grid size.
|
|
static float | GetMatAndBoundsSurfaceAreaInDir (IEntity ent, vector dir, vector mat[4], vector mins, vector maxs) |
| Returns 2D surface area (in m^2) for the input bound box and matrix.
|
|
static float | GetSurfaceAreaInDir (IEntity ent, vector dir) |
| Returns 2D surface area (in m^2) of the object's bounding box exposed in the input direction.
|
|
static vector | GetEntityCenterLocal (IEntity ent) |
| Returns the center of the entity from its bounding box in local coordinates.
|
|
static bool | GetStringContainsInvalidCharacters (string s) |
| Returns whether the input string contains invalid characters (for file names)
|
|
static void | DisplayEntityNameText (IEntity ent, int color, int camIndex) |
| Show the name of the entity above it using the input camera index for direction etc.
|
|
static void | SetHierarchyVelocity (notnull IEntity ent, vector newVelocity) |
| Set linear velocity for whole hierarchy.
|
|
static void | SetHierarchyAngularVelocity (notnull IEntity ent, vector newAngularVelocity) |
| Set angular velocity for whole hierarchy.
|
|
static void | SetHierarchyBodyActive (notnull IEntity ent, ActiveState activeState, bool resetVelocity=false) |
| Sets physics active state for whole hierarchy.
|
|
static bool | IsAnyInherited (notnull IEntity entity, array< TypeName > typenames) |
| Returns true if the given entity is inherited from list of typesnames given as argument.
|
|
static bool | ApplyDamage (IEntity entity, IEntity weapon, float dmg, EDamageType dmgType, string hitZone, SurfaceProperties surface, int nodeIdx) |
|
static ActionsManagerComponent | FindActionsManagerComponent (IEntity entity, bool activeOnly=true) |
| Check whether entity has actions manager and return it if it exists.
|
|
static SCR_EditorActionsManagerComponent | FindEditorActionsManagerComponent (IEntity entity) |
| Check whether entity has editor actions manager and return it if it exists.
|
|
static bool | GetModelAndRemapFromResource (ResourceName resourcePath, out ResourceName modelPath, out string remap) |
| Read the input resource and returns whether a model was successfully found, filling the output model and remap paths.
|
|
static bool | GetResourceContainsComponent (ResourceName resourcePath, string componentClassName, out bool isPrefab) |
| Read the input resource and returns whether it contains a component on input name, filling whether the resource is a prefab.
|
|
static bool | IsEditMode () |
| Check if the game is running in edit mode.
|
|
static bool | IsEditMode (notnull IEntity entity) |
| Check if the entity is running in edit mode.
|
|
static vector | ProjWorldEditorMouseScreenToWorld (GenericEntity referenceEntity) |
| Calculates the world direction of the mouse cursor projected into world space in the World Editor.
|
|
static bool | TeleportLocalPlayer (vector worldPosition, SCR_EPlayerTeleportedReason teleportReason=SCR_EPlayerTeleportedReason.DEFAULT) |
| Teleport local player to given position.
|
|
static bool | TeleportPlayer (int playerId, vector worldPosition, SCR_EPlayerTeleportedReason teleportReason=SCR_EPlayerTeleportedReason.DEFAULT) |
| Teleport player to given position.
|
|
static void | DrawMatrix (vector matrix[4], float scale=1, ShapeFlags flags=ShapeFlags.ONCE|ShapeFlags.NOZBUFFER, int colorX=Color.RED, int colorY=Color.GREEN, int colorZ=Color.BLUE) |
| Draw lines representing transformation matrix.
|
|
static void | DrawTrace (TraceParam trace, float traceCoef=-1, ShapeFlags flags=ShapeFlags.ONCE|ShapeFlags.NOZBUFFER|ShapeFlags.NOOUTLINE, int colorEnd=Color.BLACK, int colorIntersect=Color.PINK) |
| Draw lines representing trace param.
|
|
static void | SetMaterial (IEntity entity, ResourceName material, bool recursively=true) |
| Set material to an entity.
|
|
static bool | IsChangedMouseAndKeyboard (EInputDeviceType oldDevice, EInputDeviceType newDevice) |
| Check if the change triggered by GetGame().OnInputDeviceUserChangedInvoker() is only between mouse and keyboard.
|
|
static ResourceName | GetRootWorld (ResourceName worldPath=ResourceName.Empty) |
| Get path to the root world.
|
|
static ResourceName | GetResourceName (string path) |
| Get resource name of a file on given path.
|
|
static int | GetFrequencies (SCR_GadgetManagerComponent gadgetManager, out notnull set< int > outFrequencies) |
| Get all frequencies entity with given gadget manager listens to.
|
|
static bool | IsAdminRole (EPlayerRole role) |
| Check if given player role has admin rights.
|
|
static bool | IsAdmin (int playerID) |
| Check if given player is an admin.
|
|
static bool | IsAdmin () |
| Check if local player is an admin.
|
|
static ResourceName | GetPrefabAttributeResource (notnull IEntity entity, string containerType, string attributeName) |
| Get attribute resourceName from a specified component of the entity's prefab.
|
|