GetStandingHeight & CreateNpcFromTemplate [097 RC5]

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.
Locked
Developer Silver
Apprentice Poster
Posts: 58
Joined: Sun Feb 05, 2006 1:34 pm

GetStandingHeight & CreateNpcFromTemplate [097 RC5]

Post by Developer Silver »

From docs
GetStandingHeight( x, y, startz, realm := _DEFAULT_REALM )
Gets the lowest z height value one could stand at x,y starting at "startz".
There's something wrong in latest core with standing layers detection: this function returns also lower z than startz.

Using

Code: Select all

GetStandingHeight(who.x, who.y, who.z, who.realm)
when who is on a boat at z -4, returns z -85 (a submarine dungeon).


CreateNpcFromTemplate() also creates NPCs in the submarine dungeon when I use it with the (map) sea z (-5), and creates NPCs on the ground (z 0) when used in an undermap tunnel (z -25) if subterrain location is blocked: it seems that CreateNpcFromTemplate() doesn't return "Not a valid location for an NPC!" when there is another valid layer in same x&y, even at very different z.
Developer Silver
Apprentice Poster
Posts: 58
Joined: Sun Feb 05, 2006 1:34 pm

Post by Developer Silver »

I think this is linked to previous layer problem:

Walking (and running) functions can move NPCs at impossibile locations: moving NPCs toward coasts make them walk on (static) sea bed even if there is a layer of impassable and LoS-blocking tiles between surface and deep.
Locked