Merge branch 'master' into careminster-presence-refactor

This commit is contained in:
Melanie
2011-02-24 02:37:21 +00:00
9 changed files with 115 additions and 34 deletions

View File

@@ -471,10 +471,17 @@ namespace OpenSim.Framework
/// <param name="oldy">Old region y-coord</param>
/// <param name="newy">New region y-coord</param>
/// <returns></returns>
public static bool IsOutsideView(uint oldx, uint newx, uint oldy, uint newy)
public static bool IsOutsideView(float drawdist, uint oldx, uint newx, uint oldy, uint newy)
{
// Eventually this will be a function of the draw distance / camera position too.
return (((int)Math.Abs((int)(oldx - newx)) > 1) || ((int)Math.Abs((int)(oldy - newy)) > 1));
int dd = (int)((drawdist + Constants.RegionSize - 1) / Constants.RegionSize);
int startX = (int)oldx - dd;
int startY = (int)oldy - dd;
int endX = (int)oldx + dd;
int endY = (int)oldy + dd;
return (newx < startX || endX < newx || newy < startY || endY < newy);
}
public static string FieldToString(byte[] bytes)