CoarseLocationUpdate

From Second Life Wiki
Revision as of 08:38, 27 January 2012 by Jonathan Yap (talk | contribs) (Corrected max Z to 1020 (255*4))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Message Layout

{
	CoarseLocationUpdate Medium Trusted Unencoded
	{
		Location	Variable
		{	X		U8	}
		{	Y		U8	}
		{	Z		U8	}	
	}
	{
		Index 		Single
		{	You		S16	}
		{	Prey	S16	}
	}
}

Usage and Notes

This packet is used to populate the mini-map with the green indicators to represent where agents are. Z axis is multiplied by 4 to obtain true Z location. This still leaves the problem of the Z axis being limited to 1020m in height. Anything above that height overflows the U8 and is reported as 0.

The 'You' and 'Prey' index values are to tell the client what location in the set is the logged in agent, and if they are mapping or following somebody, what index value in the set that person is. Index values start at 0, where 0 is the first item in the list. If locations for 'You' or 'Prey' aren't present in the Location blocks, their indices are -1.

Official Client Behavior

The mini-map avatar list is cleared every time this message is received.

The client does not draw the green dot that represents them on the mini-map, this is the reason for the You index. Prey index causes the client to draw a red circle in place of the little green indicator.