[0.17.18]API: teleport exception

Bugs that are actually features.
User avatar
aspd199
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Jul 14, 2017 10:10 pm
Contact:

[0.17.18]API: teleport exception

Post by aspd199 »

API: teleport
When the player is telepport in a entity position, the locked position cannot move.
Log file no error record
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.18]API: teleport exception

Post by posila »

Yes, API allows you to do things that might not be percieved as desirable by a player; it is your job to handle undesirable behavior if that is not what you intended to happen.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [0.17.18]API: teleport exception

Post by darkfrei »

You are need to find non colliding position before

Code: Select all

new_position = surface.find_non_colliding_position('player', position, 128, 2)
User avatar
aspd199
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Jul 14, 2017 10:10 pm
Contact:

Re: [0.17.18]API: teleport exception

Post by aspd199 »

well thank you!
Post Reply

Return to “Not a bug”