116 {
118
119#ifdef DIAG_DEVELOPER
120 if (
GetGame().IsMultiplayer() && breakSync)
121 {
122 vector v;
123 v[0] = Math.RandomFloat(-Math.PI, Math.PI);
124 v[1] = Math.RandomFloat(-Math.PI, Math.PI);
125 v[2] = Math.RandomFloat(-Math.PI, Math.PI);
128
129 v[0] = Math.RandomFloat(-Math.PI, Math.PI);
130 v[1] = Math.RandomFloat(-Math.PI, Math.PI);
131 v[2] = Math.RandomFloat(-Math.PI, Math.PI);
132 playerRoot.SetOrientation(v * Math.RAD2DEG);
133 }
134#endif
135
136 if (position[1] <
GetGame().SurfaceGetSeaLevel())
137 {
139 }
140
142 {
143 playerRoot.SetPosition(position);
144 }
145 else
146 {
147 Param4<float, float, float, bool> params = new Param4<float, float, float, bool>(position[0], position[1], position[2], breakSync);
148 player.RPCSingleParam(
ERPCs.DEV_RPC_TELEPORT, params,
true);
149 }
150 }
proto native float SurfaceGetSeaLevel()
static Object GetPlayerRootForTeleporting(PlayerBase player)
proto native CGame GetGame()
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.