10 vector pos_player = player.GetPosition();
22 int hitComponentIndex;
23 DayZPhysics.
RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, NULL, NULL, ignore);
29 bool breakSync =
false;
63 bool breakSync =
false;
90 if (
GetGame().IsMultiplayer() && breakSync)
108 object.SetPosition(position);
112 Param4<float, float, float, bool> params =
new Param4<float, float, float, bool>(position[0], position[1], position[2], breakSync);
113 player.RPCSingleParam(
ERPCs.DEV_RPC_TELEPORT, params,
true);
127 transport.SetDirection(direction);
130 player.SetDirection(direction);
134 Param3<float, float, float> params =
new Param3<float, float, float>(direction[0], direction[1], direction[2]);
135 player.RPCSingleParam(
ERPCs.DEV_RPC_SET_PLAYER_DIRECTION, params,
true);
141 #ifdef DIAG_DEVELOPER
142 if ( rpc_type ==
ERPCs.DEV_RPC_TELEPORT )
146 else if ( rpc_type ==
ERPCs.DEV_RPC_SET_PLAYER_DIRECTION )
155 Param4<float, float, float, bool> p =
new Param4<float, float, float, bool>(0, 0, 0,
false);
168 Param3<float, float, float> p =
new Param3<float, float, float>(0, 0, 0);
proto native vector GetCurrentCameraDirection()
proto native vector GetCurrentCameraPosition()
Super root of all classes in Enforce script.
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
static proto bool SphereCastBullet(vector begPos, vector endPos, float radius, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
static void LogWarning(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as warning message.
static bool IsFreeCameraEnabled()
static void TeleportAtCursor()
static protected const float TELEPORT_DISTANCE_MAX
static protected void OnRPCSetPlayerDirection(PlayerBase player, ParamsReadContext ctx)
static void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
static void TeleportAtCursorEx()
static void SetPlayerPosition(PlayerBase player, vector position, bool breakSync=false)
static protected const float TELEPORT_DISTANCE_MAX_EX
static protected void OnRPCSetPlayerPosition(PlayerBase player, ParamsReadContext ctx)
static void SetPlayerDirection(PlayerBase player, vector direction)
proto native Transport GetTransport()
Serialization general interface. Serializer API works with:
proto bool Read(void value_in)
Base native class for all motorized wheeled vehicles.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static const float RAD2DEG
proto native void SetVelocity(notnull IEntity ent, vector vel)
Sets linear velocity (for Rigid bodies)
proto void dBodySetAngularVelocity(notnull IEntity body, vector angvel)
Changed an angular velocity.