couple of small fixes.

afrisby
MW 2007-12-12 17:15:37 +00:00
parent da7fd71fa2
commit 8a2a6ad761
2 changed files with 38 additions and 38 deletions

View File

@ -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()
m_restartTimer.Interval = 15000;
m_incrementsof15seconds = (int) seconds/15;
m_incrementsof15seconds = (int)seconds / 15;
m_RestartTimerCounter = 0;
m_restartTimer.AutoReset = true;
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.OutPacket(new libsecondlife.Packets.DisableSimulatorPacket(), ThrottleOutPacketType.Task);
});
});
// Wait here, or the kick messages won't actually get to the agents before the scene terminates.
Thread.Sleep(500);
@ -738,8 +738,8 @@ namespace OpenSim.Region.Environment.Scenes
foreach (AssetBase asset in textures)
{
System.Drawing.Image image= OpenJPEGNet.OpenJPEG.DecodeToImage(asset.Data);
bitImages.Add(image);
System.Drawing.Image image = OpenJPEGNet.OpenJPEG.DecodeToImage(asset.Data);
bitImages.Add(image);
}
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++)
{
ushort x = (ushort) ((mapBlocks[i].X - this.RegionInfo.RegionLocX) + 10);
ushort y = (ushort) ((mapBlocks[i].Y - this.RegionInfo.RegionLocY) + 10);
g.DrawImage(bitImages[i], (x*128), (y*128), 128, 128);
ushort x = (ushort)((mapBlocks[i].X - this.RegionInfo.RegionLocX) + 10);
ushort y = (ushort)((mapBlocks[i].Y - this.RegionInfo.RegionLocY) + 10);
g.DrawImage(bitImages[i], (x * 128), (y * 128), 128, 128);
}
mapTexture.Save(fileName, System.Drawing.Imaging.ImageFormat.Jpeg);
}
@ -896,25 +896,25 @@ namespace OpenSim.Region.Environment.Scenes
{
EntityIntersection rayTracing = null;
ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID));
if (presence != null)
{
Vector3 CameraPosition = presence.CameraPosition;
Vector3 rayEnd = new Vector3(pos.X, pos.Y, pos.Z);
ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID));
if (presence != null)
{
Vector3 CameraPosition = presence.CameraPosition;
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 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;
}
protected void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
protected void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
{
if (m_AvatarFactory == null ||
!m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
@ -1723,7 +1723,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="agentID"></param>
/// <param name="sessionID"></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!
if ((controller.SessionId == sessionID) && (controller.AgentId == agentID))

View File

@ -238,14 +238,14 @@ namespace OpenSim.Region.Environment.Scenes
public SceneObjectGroup(Scene scene, ulong regionHandle, SceneObjectPart part)
{
m_scene = scene;
m_regionHandle = regionHandle;
part.SetParent(this);
part.ParentID = 0;
m_parts.Add(part.UUID, part);
SetPartAsRoot(part);
RegionHandle = regionHandle;
AttachToBackup();
ApplyPhysics();