couple of small fixes.
parent
da7fd71fa2
commit
8a2a6ad761
|
@ -371,7 +371,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
// Now we figure out what to set the timer to that does the notifications and calls, RestartNow()
|
// Now we figure out what to set the timer to that does the notifications and calls, RestartNow()
|
||||||
m_restartTimer.Interval = 15000;
|
m_restartTimer.Interval = 15000;
|
||||||
m_incrementsof15seconds = (int) seconds/15;
|
m_incrementsof15seconds = (int)seconds / 15;
|
||||||
m_RestartTimerCounter = 0;
|
m_RestartTimerCounter = 0;
|
||||||
m_restartTimer.AutoReset = true;
|
m_restartTimer.AutoReset = true;
|
||||||
m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
|
m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
|
||||||
|
@ -463,7 +463,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
avatar.ControllingClient.Kick("The simulator is going down.");
|
avatar.ControllingClient.Kick("The simulator is going down.");
|
||||||
|
|
||||||
avatar.ControllingClient.OutPacket(new libsecondlife.Packets.DisableSimulatorPacket(), ThrottleOutPacketType.Task);
|
avatar.ControllingClient.OutPacket(new libsecondlife.Packets.DisableSimulatorPacket(), ThrottleOutPacketType.Task);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Wait here, or the kick messages won't actually get to the agents before the scene terminates.
|
// Wait here, or the kick messages won't actually get to the agents before the scene terminates.
|
||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
|
@ -738,8 +738,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
foreach (AssetBase asset in textures)
|
foreach (AssetBase asset in textures)
|
||||||
{
|
{
|
||||||
System.Drawing.Image image= OpenJPEGNet.OpenJPEG.DecodeToImage(asset.Data);
|
System.Drawing.Image image = OpenJPEGNet.OpenJPEG.DecodeToImage(asset.Data);
|
||||||
bitImages.Add(image);
|
bitImages.Add(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.Drawing.Bitmap mapTexture = new System.Drawing.Bitmap(2560, 2560);
|
System.Drawing.Bitmap mapTexture = new System.Drawing.Bitmap(2560, 2560);
|
||||||
|
@ -749,9 +749,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
for (int i = 0; i < mapBlocks.Count; i++)
|
for (int i = 0; i < mapBlocks.Count; i++)
|
||||||
{
|
{
|
||||||
ushort x = (ushort) ((mapBlocks[i].X - this.RegionInfo.RegionLocX) + 10);
|
ushort x = (ushort)((mapBlocks[i].X - this.RegionInfo.RegionLocX) + 10);
|
||||||
ushort y = (ushort) ((mapBlocks[i].Y - this.RegionInfo.RegionLocY) + 10);
|
ushort y = (ushort)((mapBlocks[i].Y - this.RegionInfo.RegionLocY) + 10);
|
||||||
g.DrawImage(bitImages[i], (x*128), (y*128), 128, 128);
|
g.DrawImage(bitImages[i], (x * 128), (y * 128), 128, 128);
|
||||||
}
|
}
|
||||||
mapTexture.Save(fileName, System.Drawing.Imaging.ImageFormat.Jpeg);
|
mapTexture.Save(fileName, System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||||
}
|
}
|
||||||
|
@ -896,25 +896,25 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
|
|
||||||
EntityIntersection rayTracing = null;
|
EntityIntersection rayTracing = null;
|
||||||
ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID));
|
ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID));
|
||||||
if (presence != null)
|
if (presence != null)
|
||||||
{
|
{
|
||||||
Vector3 CameraPosition = presence.CameraPosition;
|
Vector3 CameraPosition = presence.CameraPosition;
|
||||||
Vector3 rayEnd = new Vector3(pos.X, pos.Y, pos.Z);
|
Vector3 rayEnd = new Vector3(pos.X, pos.Y, pos.Z);
|
||||||
|
|
||||||
float raydistance = m_innerScene.Vector3Distance(CameraPosition, rayEnd);
|
float raydistance = m_innerScene.Vector3Distance(CameraPosition, rayEnd);
|
||||||
|
|
||||||
Vector3 rayDirection = new Vector3(rayEnd.x / raydistance, rayEnd.y / raydistance, rayEnd.z / raydistance);
|
Vector3 rayDirection = new Vector3(rayEnd.x / raydistance, rayEnd.y / raydistance, rayEnd.z / raydistance);
|
||||||
|
|
||||||
Ray rezRay = new Ray(CameraPosition, rayDirection);
|
Ray rezRay = new Ray(CameraPosition, rayDirection);
|
||||||
|
|
||||||
Vector3 RezDirectionFromCamera = rezRay.Direction;
|
Vector3 RezDirectionFromCamera = rezRay.Direction;
|
||||||
|
|
||||||
rayTracing = m_innerScene.GetClosestIntersectingPrim(rezRay);
|
rayTracing = m_innerScene.GetClosestIntersectingPrim(rezRay);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((rayTracing != null) && ( rayTracing.HitTF))
|
if ((rayTracing != null) && (rayTracing.HitTF))
|
||||||
{
|
{
|
||||||
// We raytraced and found a prim in the way of the ground.. so
|
// We raytraced and found a prim in the way of the ground.. so
|
||||||
// We will rez the object somewhere close to the prim. Better math needed. This is a Stub
|
// We will rez the object somewhere close to the prim. Better math needed. This is a Stub
|
||||||
|
@ -1143,7 +1143,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return avatar;
|
return avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
|
protected void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
|
||||||
{
|
{
|
||||||
if (m_AvatarFactory == null ||
|
if (m_AvatarFactory == null ||
|
||||||
!m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
|
!m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
|
||||||
|
@ -1723,7 +1723,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="agentID"></param>
|
/// <param name="agentID"></param>
|
||||||
/// <param name="sessionID"></param>
|
/// <param name="sessionID"></param>
|
||||||
/// <param name="permChanges"></param>
|
/// <param name="permChanges"></param>
|
||||||
public void HandleObjectPermissionsUpdate (IClientAPI controller, LLUUID agentID, LLUUID sessionID, List<libsecondlife.Packets.ObjectPermissionsPacket.ObjectDataBlock> permChanges)
|
public void HandleObjectPermissionsUpdate(IClientAPI controller, LLUUID agentID, LLUUID sessionID, List<libsecondlife.Packets.ObjectPermissionsPacket.ObjectDataBlock> permChanges)
|
||||||
{
|
{
|
||||||
// Check for spoofing.. since this is permissions we're talking about here!
|
// Check for spoofing.. since this is permissions we're talking about here!
|
||||||
if ((controller.SessionId == sessionID) && (controller.AgentId == agentID))
|
if ((controller.SessionId == sessionID) && (controller.AgentId == agentID))
|
||||||
|
|
|
@ -238,14 +238,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public SceneObjectGroup(Scene scene, ulong regionHandle, SceneObjectPart part)
|
public SceneObjectGroup(Scene scene, ulong regionHandle, SceneObjectPart part)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_regionHandle = regionHandle;
|
|
||||||
|
|
||||||
part.SetParent(this);
|
part.SetParent(this);
|
||||||
part.ParentID = 0;
|
part.ParentID = 0;
|
||||||
|
|
||||||
m_parts.Add(part.UUID, part);
|
m_parts.Add(part.UUID, part);
|
||||||
SetPartAsRoot(part);
|
SetPartAsRoot(part);
|
||||||
|
|
||||||
|
RegionHandle = regionHandle;
|
||||||
|
|
||||||
AttachToBackup();
|
AttachToBackup();
|
||||||
|
|
||||||
ApplyPhysics();
|
ApplyPhysics();
|
||||||
|
|
Loading…
Reference in New Issue