# Scripted TPs tend to land you on the roof of the building you are trying to get to.

See if I can fix that.

---

reported=2019-05-19 07:47:24

reporter=onefang

priority=normal

category=Bug

severity=minor

resolution=reopened

---

2019-06-18 01:45:16 onefang: TPs from the map lands you on roofs, when you are TPing to a different sim.

TPs from scripts lands you on roofs, when you are TPing to a different sim.



Doesn't do that in 0.8, you end up at the height you asked for.



LMs work properly in both.

TPing from the map to the same sim works properly in both.

TPing from scripts to the same sim works properly in both.



---

2019-07-20 15:56:19 onefang: No amount of pretending non LM TPs are LM TPs, or LM TPs are non LM TPs is making any difference.  That's been a wild goose chase, I'll need to chase this bug down the rabbit hole to ferret out what's going on.



Er, I mean carefully manually trace things from top to bottom.

---

2019-07-21 08:42:48 onefang: OpenSim/Region/Framework/Scenes/ScenePresence.cs  MakeRootAgent() is where the problem is.  They had replaced a simple "make sure the avatar doesn't end up under ground" with a complex ray trace from 600 meters up, plus more complexity.



Later testing - people can still end up underground from LMs.  ROFL



---

2019-07-21 09:42:33 onefang: TPs from landmarks, scripts, double click on land, and links should just TP you to the location given.



TPs from the map should use the raycast method, as they are "TP from above".



The same code handles logins to, should be like map TPs if it's a "login to a region name".



TPs from lures ???



Can we tell map and link TPs apart?



---

2019-07-21 09:47:46 onefang: Map TPs always go to your current height, so maybe.

---

2019-07-21 10:08:39 onefang: Another idea is to pick out the object that raycast returns that is named special.  I could use something similar to MultiPrimDoItAll, a starter character in the prims description, but use something other than its ~#!@ starter characters.  "^" sounds good.

---

2019-07-23 19:50:32 onefang: I think I have this correct now.

---

2019-08-14 17:56:18 onefang: TP from hypergrid "Teleport home" lands on roofs, though local grid "Teleport home" from a different sim lands in the correct place.





Teleport home from other grid (lands on roof) -



19:48:22 - [SCENE PRESENCE]: Completing movement of onefang rejected into region Play Island in position <127.8579, 49.17857, 30.19794>

19:48:22 - [SCENE PRESENCE]: Teleport from above NOMAP, for onefang rejected @ <127.8579, 49.17857, 30.19794>, landing height 36.41127





Teleport home from other sim in same grid (lands in room like it should) -





19:49:37 - [SCENE PRESENCE]: Completing movement of onefang rejected into region Play Island in position <127.8579, 49.17857, 30.19794>



---

2019-08-14 18:53:50 onefang: Easily fixed.

---

2021-04-27 21:52:56 onefang: Double check this.



Also document the floor flag.
