@@ -196,25 +196,25 @@ public static void RunJumpTool(UnturnedPlayer Player, RaycastResult Raycast, Unt
196196
197197 if ( RunMode == 0 )
198198 {
199- Player . Teleport ( new Vector3 ( Raycast . Raycast . point . x , Raycast . Raycast . point . y + 0.5f , Raycast . Raycast . point . z ) , Player . Rotation ) ;
199+ Player . Player . teleportToLocationUnsafe ( Raycast . Raycast . point , Player . Rotation ) ;
200200 }
201201 else if ( RunMode == 1 )
202202 {
203203 if ( Raycast . Raycast . distance < 300 )
204204 {
205205 Vector3 Target = new Vector3 ( Raycast . Raycast . point . x , Raycast . Raycast . point . y + ( float ) 1.75 , Raycast . Raycast . point . z ) ;
206- Player . Teleport ( Target , Player . Rotation ) ;
206+ Player . Player . teleportToLocationUnsafe ( Target , Player . Rotation ) ;
207207 }
208208 else
209209 {
210- Player . Teleport ( new Vector3 ( Raycast . Raycast . point . x , Raycast . Raycast . point . y + 0.5f , Raycast . Raycast . point . z ) , Player . Rotation ) ;
210+ Player . Player . teleportToLocationUnsafe ( Raycast . Raycast . point , Player . Rotation ) ;
211211 }
212212 }
213213 else if ( RunMode == 2 )
214214 {
215215 if ( Raycast . Raycast . distance > 300 )
216216 {
217- Player . Teleport ( new Vector3 ( Raycast . Raycast . point . x , Raycast . Raycast . point . y + 0.5f , Raycast . Raycast . point . z ) , Player . Rotation ) ;
217+ Player . Player . teleportToLocationUnsafe ( Raycast . Raycast . point , Player . Rotation ) ;
218218 }
219219 else
220220 {
@@ -242,7 +242,7 @@ public static void RunJumpTool(UnturnedPlayer Player, RaycastResult Raycast, Unt
242242
243243 if ( DownCast . RaycastHit && DownCast . Raycast . distance != 0 && DownCast . Raycast . distance < DistanceToGround )
244244 {
245- Player . Teleport ( new Vector3 ( DownCast . Raycast . point . x , DownCast . Raycast . point . y + 0.5f , DownCast . Raycast . point . z ) , Player . Rotation ) ;
245+ Player . Player . teleportToLocationUnsafe ( new Vector3 ( DownCast . Raycast . point . x , DownCast . Raycast . point . y + 0.2f , DownCast . Raycast . point . z ) , Player . Rotation ) ;
246246 }
247247 else
248248 {
@@ -266,19 +266,19 @@ public static void RunJumpTool(UnturnedPlayer Player, RaycastResult Raycast, Unt
266266
267267 if ( Placing . Count ( ) != 0 )
268268 {
269- Player . Teleport ( new Vector3 ( Placing [ 0 ] . x , Placing [ 0 ] . y + 0.5f , Placing [ 0 ] . z ) , Player . Rotation ) ;
269+ Player . Player . teleportToLocationUnsafe ( new Vector3 ( Placing [ 0 ] . x , Placing [ 0 ] . y + 0.5f , Placing [ 0 ] . z ) , Player . Rotation ) ;
270270 }
271271 else
272272 {
273- Player . Teleport ( new Vector3 ( TargetPos . x , TargetPos . y + 0.5f , TargetPos . z ) , Player . Rotation ) ;
273+ Player . Player . teleportToLocationUnsafe ( new Vector3 ( TargetPos . x , TargetPos . y + 0.5f , TargetPos . z ) , Player . Rotation ) ;
274274 }
275275 }
276276 else if ( gesture == UnturnedPlayerEvents . PlayerGesture . Point )
277277 {
278278 Vector3 TargetPos = Raycast . Raycast . point ;
279279 Vector3 CurrentPos = Player . Position ;
280280 Vector3 ResultPos = Vector3 . MoveTowards ( TargetPos , CurrentPos , 1 ) ;
281- Player . Teleport ( new Vector3 ( ResultPos . x , ResultPos . y + 0.5f , ResultPos . z ) , Player . Rotation ) ;
281+ Player . Player . teleportToLocationUnsafe ( new Vector3 ( ResultPos . x , ResultPos . y + 0.5f , ResultPos . z ) , Player . Rotation ) ;
282282 }
283283 }
284284
0 commit comments