52 proto native
void CrewGetIn( Human player,
int posIdx );
93#ifndef CFGMODS_DEFINE_TEST
94 Error(
"GetAnimInstance() not implemented");
103#ifndef CFGMODS_DEFINE_TEST
104 Error(
"GetSeatAnimationType() not implemented");
111#ifndef CFGMODS_DEFINE_TEST
112 Error(
"Get3rdPersonCameraType() not implemented");
121#ifndef CFGMODS_DEFINE_TEST
130#ifndef CFGMODS_DEFINE_TEST
139#ifndef CFGMODS_DEFINE_TEST
148#ifndef CFGMODS_DEFINE_TEST
158 switch (pDoorSelection)
163 case "DoorsCoDriver":
202 return ( ( e && (e.IsZombie() || e.IsHologram()) ) || o.CanBeSkinned() || o.IsBush() || o.IsTree() );
207 GetTransform(transform);
211 CrewEntry( currentSeat, crewPos, crewDir );
216 entry[1] = entry[2] * entry[0];
221 vector position = transform[3];
224 position[1] = position[1] + maxAllowedObjHeight + (extents[1] * 0.5);
229 excluded.Insert(
this);
234 transform[3] = position;
236 foreach (
Object o : collided)
239 if (IsIgnoredObject(o))
243 if (o.GetCollisionBox(minmax))
250 bool IsAreaAtDoorFree(
int currentSeat,
float maxAllowedObjHeight = 0.5,
float horizontalExtents = 0.5,
float playerHeight = 1.7 )
255 extents[0] = horizontalExtents;
256 extents[1] = playerHeight;
257 extents[2] = horizontalExtents;
259 return IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform );
262 Shape DebugFreeAreaAtDoor(
int currentSeat,
float maxAllowedObjHeight = 0.5,
float horizontalExtents = 0.5,
float playerHeight = 1.7 )
264 int color =
ARGB(20, 0, 255, 0);
269 extents[0] = horizontalExtents;
270 extents[1] = playerHeight;
271 extents[2] = horizontalExtents;
273 if (!
IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform ))
275 color =
ARGB(20, 255, 0, 0);
279 shape.SetMatrix(transform);
ref TIntArray m_InteractActions
proto native bool IsBoxColliding(vector center, vector orientation, vector edgeLength, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
Finds all objects that are in choosen oriented bounding box (OBB)
Super root of all classes in Enforce script.
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
ref TIntArray m_SingleUseActions
int GetSeatIndexFromDoor(string pDoorSelection)
bool IsIgnoredObject(Object o)
bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
proto void CrewTransformWS(int posIdx, out vector mat[4])
Returns crew transformation indside vehicle in world space.
override bool ShowZonesHealth()
proto native void CrewGetIn(Human player, int posIdx)
Performs transfer of player from world into vehicle on given position.
proto native void Synchronize()
Synchronizes car's state in case the simulation is not running.
bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])
proto void CrewEntryWS(int posIdx, out vector pos, out vector dir)
Reads entry point and direction into vehicle on given position in world space.
ref TIntArray m_ContinuousActions
proto void CrewTransform(int posIdx, out vector mat[4])
Returns crew transformation indside vehicle in model space.
override int GetMeleeTargetType()
Shape DebugFreeAreaAtDoor(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
proto native Human CrewMember(int posIdx)
proto native int CrewSize()
Returns crew capacity of this vehicle.
proto native void CrewDeath(int posIdx)
Handles death of player in vehicle and awakes its physics if needed.
int Get3rdPersonCameraType()
override bool IsHealthVisible()
proto native int CrewPositionIndex(int componentIdx)
override bool IsIgnoredByConstruction()
int GetSeatAnimationType(int posIdx)
vector GetTransportCameraOffset()
bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
float GetTransportCameraDistance()
bool CrewCanGetThrough(int posIdx)
override bool IsTransport()
proto void CrewEntry(int posIdx, out vector pos, out vector dir)
Reads entry point and direction into vehicle on given position in model space.
proto native Human CrewGetOut(int posIdx)
Performs transfer of player from vehicle into world from given position.
proto native int CrewMemberIndex(Human player)
bool CanReachSeatFromDoors(string pSeatSelection, vector pFromPos, float pDistance=1.0)
proto native Transport GetTransport()
Base native class for all motorized wheeled vehicles.
override bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
proto void RotationMatrixFromAngles(out vector mat[3])
Creates rotation matrix from angles.
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto void MatrixMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Transforms matrix.
static proto vector MatrixToAngles(vector mat[3])
Returns angles of rotation matrix.
proto native bool dGetInteractionLayer(notnull IEntity worldEntity, int mask1, int mask2)
proto native int dBodyGetInteractionLayer(notnull IEntity ent)
int ARGB(int a, int r, int g, int b)