* even more renaming and refactoring; the cleaning woman is on call.

afrisby
lbsa71 2007-09-20 23:47:32 +00:00
parent 101369e25a
commit ca611c6668
13 changed files with 95 additions and 96 deletions

View File

@ -588,7 +588,7 @@ namespace OpenSim
avatar.Firstname, avatar.Firstname,
avatar.Lastname, avatar.Lastname,
avatar.UUID, avatar.UUID,
avatar.ControllingClient.AgentId, avatar._ControllingClient.AgentId,
"Unknown", "Unknown",
"Unknown", "Unknown",
regionName)); regionName));

View File

@ -335,7 +335,7 @@ namespace OpenSim.Region.Environment
for (int i = 0; i < avatars.Count; i++) for (int i = 0; i < avatars.Count; i++)
{ {
sendRegionInfoPacket(avatars[i].ControllingClient); sendRegionInfoPacket(avatars[i]._ControllingClient);
} }
} }
@ -343,7 +343,7 @@ namespace OpenSim.Region.Environment
{ {
m_scene.ForEachScenePresence( delegate( ScenePresence scenePresence ) m_scene.ForEachScenePresence( delegate( ScenePresence scenePresence )
{ {
sendRegionHandshake(scenePresence.ControllingClient); sendRegionHandshake(scenePresence._ControllingClient);
}); });
} }

View File

@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.LandManagement
(int) Math.Round(avatars[i].AbsolutePosition.Y)); (int) Math.Round(avatars[i].AbsolutePosition.Y));
if (over.landData.localID == landData.localID) if (over.landData.localID == landData.localID)
{ {
sendLandProperties(0, false, 0, avatars[i].ControllingClient); sendLandProperties(0, false, 0, avatars[i]._ControllingClient);
} }
} }
} }

View File

@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules
string mess = inputLine.Substring(inputLine.IndexOf(m_channel)); string mess = inputLine.Substring(inputLine.IndexOf(m_channel));
m_scene.ForEachScenePresence(delegate(ScenePresence presence) m_scene.ForEachScenePresence(delegate(ScenePresence presence)
{ {
presence.ControllingClient.SendChatMessage( presence._ControllingClient.SendChatMessage(
Helpers.StringToField(mess), 255, pos, "IRC:", Helpers.StringToField(mess), 255, pos, "IRC:",
LLUUID.Zero); LLUUID.Zero);
}); });
@ -159,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules
int dis = -1000; int dis = -1000;
//err ??? the following code seems to be request a scenePresence when it already has a ref to it //err ??? the following code seems to be request a scenePresence when it already has a ref to it
avatar = m_scene.GetScenePresence(presence.ControllingClient.AgentId); avatar = m_scene.GetScenePresence(presence._ControllingClient.AgentId);
if (avatar != null) if (avatar != null)
{ {
dis = (int) avatar.AbsolutePosition.GetDistanceTo(fromPos); dis = (int) avatar.AbsolutePosition.GetDistanceTo(fromPos);
@ -171,7 +171,7 @@ namespace OpenSim.Region.Environment.Modules
if ((dis < 10) && (dis > -10)) if ((dis < 10) && (dis > -10))
{ {
//should change so the message is sent through the avatar rather than direct to the ClientView //should change so the message is sent through the avatar rather than direct to the ClientView
presence.ControllingClient.SendChatMessage(message, presence._ControllingClient.SendChatMessage(message,
type, type,
fromPos, fromPos,
fromName, fromName,
@ -182,7 +182,7 @@ namespace OpenSim.Region.Environment.Modules
if ((dis < 30) && (dis > -30)) if ((dis < 30) && (dis > -30))
{ {
//Console.WriteLine("sending chat"); //Console.WriteLine("sending chat");
presence.ControllingClient.SendChatMessage(message, presence._ControllingClient.SendChatMessage(message,
type, type,
fromPos, fromPos,
fromName, fromName,
@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules
case 2: // Shout case 2: // Shout
if ((dis < 100) && (dis > -100)) if ((dis < 100) && (dis > -100))
{ {
presence.ControllingClient.SendChatMessage(message, presence._ControllingClient.SendChatMessage(message,
type, type,
fromPos, fromPos,
fromName, fromName,
@ -201,7 +201,7 @@ namespace OpenSim.Region.Environment.Modules
break; break;
case 0xff: // Broadcast case 0xff: // Broadcast
presence.ControllingClient.SendChatMessage(message, type, presence._ControllingClient.SendChatMessage(message, type,
fromPos, fromPos,
fromName, fromName,
fromAgentID); fromAgentID);

View File

@ -33,7 +33,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
public abstract class Entity : EntityBase //this class (Entity) will be phased out public abstract class Entity : EntityBase //this class (Entity) will be phased out
{ {
protected PhysicsActor _physActor; protected PhysicsActor m_physicsActor;
/// <summary> /// <summary>
/// ///
@ -42,24 +42,24 @@ namespace OpenSim.Region.Environment.Scenes
{ {
get get
{ {
if (_physActor != null) if (m_physicsActor != null)
{ {
m_pos.X = _physActor.Position.X; m_pos.X = m_physicsActor.Position.X;
m_pos.Y = _physActor.Position.Y; m_pos.Y = m_physicsActor.Position.Y;
m_pos.Z = _physActor.Position.Z; m_pos.Z = m_physicsActor.Position.Z;
} }
return m_pos; return m_pos;
} }
set set
{ {
if (_physActor != null) if (m_physicsActor != null)
{ {
try try
{ {
lock (m_scene.SyncRoot) lock (m_scene.SyncRoot)
{ {
_physActor.Position = new PhysicsVector(value.X, value.Y, value.Z); m_physicsActor.Position = new PhysicsVector(value.X, value.Y, value.Z);
} }
} }
catch (Exception e) catch (Exception e)
@ -80,24 +80,24 @@ namespace OpenSim.Region.Environment.Scenes
{ {
get get
{ {
if (_physActor != null) if (m_physicsActor != null)
{ {
m_velocity.X = _physActor.Velocity.X; m_velocity.X = m_physicsActor.Velocity.X;
m_velocity.Y = _physActor.Velocity.Y; m_velocity.Y = m_physicsActor.Velocity.Y;
m_velocity.Z = _physActor.Velocity.Z; m_velocity.Z = m_physicsActor.Velocity.Z;
} }
return m_velocity; return m_velocity;
} }
set set
{ {
if (_physActor != null) if (m_physicsActor != null)
{ {
try try
{ {
lock (m_scene.SyncRoot) lock (m_scene.SyncRoot)
{ {
_physActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); m_physicsActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z);
} }
} }
catch (Exception e) catch (Exception e)

View File

@ -21,7 +21,7 @@ namespace OpenSim.Region.Environment.Scenes
if ( TryGetAvatar( avatarId, out avatar )) if ( TryGetAvatar( avatarId, out avatar ))
{ {
AddInventoryItem(avatar.ControllingClient, item); AddInventoryItem(avatar._ControllingClient, item);
} }
} }
@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes
if (TryGetAvatar(avatarId, out avatar)) if (TryGetAvatar(avatarId, out avatar))
{ {
return CapsUpdateInventoryItemAsset(avatar.ControllingClient, itemID, data); return CapsUpdateInventoryItemAsset(avatar._ControllingClient, itemID, data);
} }
return LLUUID.Zero; return LLUUID.Zero;

View File

@ -77,7 +77,7 @@ namespace OpenSim.Region.Environment.Scenes
ScenePresence fromAvatar = m_scenePresences[fromAgentID]; ScenePresence fromAvatar = m_scenePresences[fromAgentID];
ScenePresence toAvatar = m_scenePresences[toAgentID]; ScenePresence toAvatar = m_scenePresences[toAgentID];
string fromName = fromAvatar.Firstname + " " + fromAvatar.Lastname; string fromName = fromAvatar.Firstname + " " + fromAvatar.Lastname;
toAvatar.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, toAgentID, toAvatar._ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, toAgentID,
imSessionID, fromName, dialog, timestamp); imSessionID, fromName, dialog, timestamp);
} }
else else
@ -508,7 +508,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
ForEachScenePresence(delegate(ScenePresence presence) ForEachScenePresence(delegate(ScenePresence presence)
{ {
presence.ControllingClient.SendAnimation(animID, seq, client.AgentId); presence._ControllingClient.SendAnimation(animID, seq, client.AgentId);
}); });
} }

View File

@ -310,7 +310,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (Terrain.Tainted(x * 16, y * 16)) if (Terrain.Tainted(x * 16, y * 16))
{ {
SendLayerData(x, y, presence.ControllingClient, SendLayerData(x, y, presence._ControllingClient,
terData); terData);
} }
} }
@ -344,7 +344,7 @@ namespace OpenSim.Region.Environment.Scenes
List<ScenePresence> avatars = GetAvatars(); List<ScenePresence> avatars = GetAvatars();
foreach (ScenePresence avatar in avatars) foreach (ScenePresence avatar in avatars)
{ {
avatar.ControllingClient.SendViewerTime(m_timePhase); avatar._ControllingClient.SendViewerTime(m_timePhase);
} }
m_timeUpdateCount = 0; m_timeUpdateCount = 0;
@ -396,7 +396,7 @@ namespace OpenSim.Region.Environment.Scenes
storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD()); storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD());
ForEachScenePresence(delegate(ScenePresence presence) { SendLayerData(presence.ControllingClient); }); ForEachScenePresence(delegate(ScenePresence presence) { SendLayerData(presence._ControllingClient); });
foreach (LLUUID UUID in Entities.Keys) foreach (LLUUID UUID in Entities.Keys)
{ {
@ -424,7 +424,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD()); storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD());
ForEachScenePresence(delegate(ScenePresence presence) { SendLayerData(presence.ControllingClient); }); ForEachScenePresence(delegate(ScenePresence presence) { SendLayerData(presence._ControllingClient); });
foreach (LLUUID UUID in Entities.Keys) foreach (LLUUID UUID in Entities.Keys)
{ {
@ -829,10 +829,10 @@ namespace OpenSim.Region.Environment.Scenes
delegate(ScenePresence presence) delegate(ScenePresence presence)
{ {
presence.CoarseLocationChange(avatar); presence.CoarseLocationChange(avatar);
presence.ControllingClient.SendKillObject(avatar.RegionHandle, avatar.LocalId); presence._ControllingClient.SendKillObject(avatar.RegionHandle, avatar.LocalId);
if (presence.PhysActor != null) if (presence.PhysicsActor != null)
{ {
phyScene.RemoveAvatar(presence.PhysActor); phyScene.RemoveAvatar(presence.PhysicsActor);
} }
}); });
@ -953,7 +953,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
ForEachScenePresence(delegate(ScenePresence presence) ForEachScenePresence(delegate(ScenePresence presence)
{ {
presence.ControllingClient.SendKillObject(m_regionHandle, localID); presence._ControllingClient.SendKillObject(m_regionHandle, localID);
}); });
} }
@ -1181,7 +1181,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (m_scenePresences.ContainsKey(avatarID)) if (m_scenePresences.ContainsKey(avatarID))
{ {
m_scenePresences[avatarID].ControllingClient.SendLoadURL(objectname, objectID, ownerID, groupOwned, message, url); m_scenePresences[avatarID]._ControllingClient.SendLoadURL(objectname, objectID, ownerID, groupOwned, message, url);
} }
} }
@ -1197,7 +1197,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
foreach (ScenePresence presence in m_scenePresences.Values) foreach (ScenePresence presence in m_scenePresences.Values)
{ {
presence.ControllingClient.SendAlertMessage(message); presence._ControllingClient.SendAlertMessage(message);
} }
} }
@ -1205,7 +1205,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (m_scenePresences.ContainsKey(agentID)) if (m_scenePresences.ContainsKey(agentID))
{ {
m_scenePresences[agentID].ControllingClient.SendAgentAlertMessage(message, modal); m_scenePresences[agentID]._ControllingClient.SendAgentAlertMessage(message, modal);
} }
} }
@ -1215,7 +1215,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if ((presence.Firstname == firstName) && (presence.Lastname == lastName)) if ((presence.Firstname == firstName) && (presence.Lastname == lastName))
{ {
presence.ControllingClient.SendAgentAlertMessage(message, modal); presence._ControllingClient.SendAgentAlertMessage(message, modal);
break; break;
} }
} }
@ -1303,7 +1303,7 @@ namespace OpenSim.Region.Environment.Scenes
scenePrescence.Firstname, scenePrescence.Firstname,
scenePrescence.Lastname, scenePrescence.Lastname,
scenePrescence.UUID, scenePrescence.UUID,
scenePrescence.ControllingClient.AgentId, scenePrescence._ControllingClient.AgentId,
"Unknown", "Unknown",
"Unknown", "Unknown",
RegionInfo.RegionName)); RegionInfo.RegionName));

View File

@ -151,7 +151,7 @@ namespace OpenSim.Region.Environment.Scenes
scenePrescence.Firstname, scenePrescence.Lastname, scenePrescence.Firstname, scenePrescence.Lastname,
newDebug)); newDebug));
scenePrescence.ControllingClient.SetDebug(newDebug); scenePrescence._ControllingClient.SetDebug(newDebug);
} }
} }
} }

View File

@ -1236,7 +1236,7 @@ namespace OpenSim.Region.Environment.Scenes
List<ScenePresence> avatars = GetScenePresences(); List<ScenePresence> avatars = GetScenePresences();
for (int i = 0; i < avatars.Count; i++) for (int i = 0; i < avatars.Count; i++)
{ {
avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalID); avatars[i]._ControllingClient.SendKillObject(m_regionHandle, part.LocalID);
} }
} }
} }

View File

@ -700,7 +700,7 @@ namespace OpenSim.Region.Environment.Scenes
List<ScenePresence> avatars = m_parentGroup.GetScenePresences(); List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
for (int i = 0; i < avatars.Count; i++) for (int i = 0; i < avatars.Count; i++)
{ {
m_parentGroup.SendPartFullUpdate(avatars[i].ControllingClient, this); m_parentGroup.SendPartFullUpdate(avatars[i]._ControllingClient, this);
} }
} }
@ -764,7 +764,7 @@ namespace OpenSim.Region.Environment.Scenes
List<ScenePresence> avatars = m_parentGroup.GetScenePresences(); List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
for (int i = 0; i < avatars.Count; i++) for (int i = 0; i < avatars.Count; i++)
{ {
m_parentGroup.SendPartTerseUpdate(avatars[i].ControllingClient, this); m_parentGroup.SendPartTerseUpdate(avatars[i]._ControllingClient, this);
} }
} }

View File

@ -40,10 +40,8 @@ namespace OpenSim.Region.Environment.Scenes
{ {
public partial class ScenePresence : Entity public partial class ScenePresence : Entity
{ {
public static bool PhysicsEngineFlying = false;
public static AvatarAnimations Animations; public static AvatarAnimations Animations;
public static byte[] DefaultTexture; public static byte[] DefaultTexture;
public IClientAPI ControllingClient;
public LLUUID current_anim; public LLUUID current_anim;
public int anim_seq; public int anim_seq;
private bool updateflag = false; private bool updateflag = false;
@ -56,8 +54,6 @@ namespace OpenSim.Region.Environment.Scenes
private AvatarWearable[] Wearables; private AvatarWearable[] Wearables;
private LLObject.TextureEntry m_textureEntry; private LLObject.TextureEntry m_textureEntry;
private ulong m_regionHandle;
public bool childAgent = true; public bool childAgent = true;
public bool IsRestrictedToRegion = false; public bool IsRestrictedToRegion = false;
@ -105,10 +101,10 @@ namespace OpenSim.Region.Environment.Scenes
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public PhysicsActor PhysActor public PhysicsActor PhysicsActor
{ {
set { _physActor = value; } set { m_physicsActor = value; }
get { return _physActor; } get { return m_physicsActor; }
} }
public bool Updated public bool Updated
@ -117,25 +113,30 @@ namespace OpenSim.Region.Environment.Scenes
get { return updateflag; } get { return updateflag; }
} }
private readonly ulong m_regionHandle;
public ulong RegionHandle public ulong RegionHandle
{ {
get { return m_regionHandle; } get { return m_regionHandle; }
} }
private string m_firstname; private readonly string m_firstname;
public string Firstname public string Firstname
{ {
get { return m_firstname; } get { return m_firstname; }
} }
private string m_lastname; private readonly string m_lastname;
public string Lastname public string Lastname
{ {
get { return m_lastname; } get { return m_lastname; }
} }
private readonly IClientAPI m_controllingClient;
public IClientAPI _ControllingClient
{
get { return m_controllingClient; }
}
#endregion #endregion
#region Constructor(s) #region Constructor(s)
@ -143,23 +144,23 @@ namespace OpenSim.Region.Environment.Scenes
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="theClient"></param> /// <param name="client"></param>
/// <param name="world"></param> /// <param name="world"></param>
/// <param name="clientThreads"></param> /// <param name="clientThreads"></param>
/// <param name="regionDat"></param> /// <param name="regionDat"></param>
public ScenePresence(IClientAPI theClient, Scene world, RegionInfo reginfo) public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo)
{ {
m_scene = world; m_scene = world;
m_uuid = theClient.AgentId; m_uuid = client.AgentId;
m_regionInfo = reginfo; m_regionInfo = reginfo;
m_regionHandle = reginfo.RegionHandle; m_regionHandle = reginfo.RegionHandle;
MainLog.Instance.Verbose("Avatar.cs "); MainLog.Instance.Verbose("Avatar.cs ");
ControllingClient = theClient; m_controllingClient = client;
m_firstname = ControllingClient.FirstName; m_firstname = m_controllingClient.FirstName;
m_lastname = ControllingClient.LastName; m_lastname = m_controllingClient.LastName;
m_localId = m_scene.NextLocalId; m_localId = m_scene.NextLocalId;
AbsolutePosition = ControllingClient.StartPos; AbsolutePosition = m_controllingClient.StartPos;
visualParams = new byte[218]; visualParams = new byte[218];
for (int i = 0; i < 218; i++) for (int i = 0; i < 218; i++)
@ -172,11 +173,11 @@ namespace OpenSim.Region.Environment.Scenes
Animations.LoadAnims(); Animations.LoadAnims();
//register for events //register for events
ControllingClient.OnRequestWearables += SendOurAppearance; m_controllingClient.OnRequestWearables += SendOurAppearance;
ControllingClient.OnSetAppearance += new SetAppearance(SetAppearance); m_controllingClient.OnSetAppearance += new SetAppearance(SetAppearance);
ControllingClient.OnCompleteMovementToRegion += CompleteMovement; m_controllingClient.OnCompleteMovementToRegion += CompleteMovement;
ControllingClient.OnCompleteMovementToRegion += SendInitialData; m_controllingClient.OnCompleteMovementToRegion += SendInitialData;
ControllingClient.OnAgentUpdate += HandleAgentUpdate; m_controllingClient.OnAgentUpdate += HandleAgentUpdate;
// ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack);
// ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
//ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
@ -221,7 +222,7 @@ namespace OpenSim.Region.Environment.Scenes
while (terse) while (terse)
{ {
SceneObjectPart part = m_tersePartUpdates.Dequeue(); SceneObjectPart part = m_tersePartUpdates.Dequeue();
part.SendTerseUpdate(ControllingClient); part.SendTerseUpdate(m_controllingClient);
terseCount++; terseCount++;
if ((m_tersePartUpdates.Count < 1) | (terseCount > 30)) if ((m_tersePartUpdates.Count < 1) | (terseCount > 30))
@ -238,7 +239,7 @@ namespace OpenSim.Region.Environment.Scenes
while (full) while (full)
{ {
SceneObjectPart part = m_fullPartUpdates.Dequeue(); SceneObjectPart part = m_fullPartUpdates.Dequeue();
part.SendFullUpdate(ControllingClient); part.SendFullUpdate(m_controllingClient);
fullCount++; fullCount++;
if ((m_fullPartUpdates.Count < 1) | (fullCount > 40)) if ((m_fullPartUpdates.Count < 1) | (fullCount > 40))
{ {
@ -273,7 +274,7 @@ namespace OpenSim.Region.Environment.Scenes
AbsolutePosition = pos; AbsolutePosition = pos;
AddToPhysicalScene( ); AddToPhysicalScene( );
_physActor.Flying = isFlying; m_physicsActor.Flying = isFlying;
m_scene.SendAllSceneObjectsToClient(this); m_scene.SendAllSceneObjectsToClient(this);
@ -291,7 +292,7 @@ namespace OpenSim.Region.Environment.Scenes
private void RemoveFromPhysicalScene() private void RemoveFromPhysicalScene()
{ {
m_scene.PhysScene.RemoveAvatar( this.PhysActor ); m_scene.PhysScene.RemoveAvatar( this.PhysicsActor );
} }
/// <summary> /// <summary>
@ -343,7 +344,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
look = new LLVector3(0.99f, 0.042f, 0); look = new LLVector3(0.99f, 0.042f, 0);
} }
ControllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look);
if (childAgent) if (childAgent)
{ {
childAgent = false; childAgent = false;
@ -364,9 +365,9 @@ namespace OpenSim.Region.Environment.Scenes
bool DCFlagKeyPressed = false; bool DCFlagKeyPressed = false;
Vector3 agent_control_v3 = new Vector3(0, 0, 0); Vector3 agent_control_v3 = new Vector3(0, 0, 0);
Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z);
bool oldflying = PhysActor.Flying; bool oldflying = PhysicsActor.Flying;
PhysActor.Flying = ((flags & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0); PhysicsActor.Flying = ((flags & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0);
if (PhysActor.Flying != oldflying) if (PhysicsActor.Flying != oldflying)
{ {
update_movementflag = true; update_movementflag = true;
} }
@ -411,7 +412,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (movementflag != 0) if (movementflag != 0)
{ {
if (_physActor.Flying) if (m_physicsActor.Flying)
{ {
SendAnimPack(Animations.AnimsLLUUID["FLY"], 1); SendAnimPack(Animations.AnimsLLUUID["FLY"], 1);
} }
@ -435,7 +436,7 @@ namespace OpenSim.Region.Environment.Scenes
direc.Normalize(); direc.Normalize();
direc = direc*((0.03f)*128f); direc = direc*((0.03f)*128f);
if (_physActor.Flying) if (m_physicsActor.Flying)
direc *= 4; direc *= 4;
newVelocity.X = direc.x; newVelocity.X = direc.x;
@ -528,7 +529,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
m_scene.ForEachScenePresence(delegate(ScenePresence presence) m_scene.ForEachScenePresence(delegate(ScenePresence presence)
{ {
SendTerseUpdateToClient(presence.ControllingClient); SendTerseUpdateToClient(presence.m_controllingClient);
}); });
} }
@ -545,7 +546,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
ControllingClient.SendCoarseLocationUpdate(CoarseLocations); m_controllingClient.SendCoarseLocationUpdate(CoarseLocations);
} }
public void CoarseLocationChange(ScenePresence avatar) public void CoarseLocationChange(ScenePresence avatar)
@ -571,7 +572,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="remoteAvatar"></param> /// <param name="remoteAvatar"></param>
public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar) public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar)
{ {
remoteAvatar.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
LocalId, AbsolutePosition, m_textureEntry.ToBytes()); LocalId, AbsolutePosition, m_textureEntry.ToBytes());
} }
@ -597,11 +598,11 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
public void SendInitialData() public void SendInitialData()
{ {
ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId,
AbsolutePosition, m_textureEntry.ToBytes()); AbsolutePosition, m_textureEntry.ToBytes());
if (!childAgent) if (!childAgent)
{ {
m_scene.InformClientOfNeighbours(ControllingClient); m_scene.InformClientOfNeighbours(m_controllingClient);
newAvatar = false; newAvatar = false;
} }
@ -615,13 +616,13 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="OurClient"></param> /// <param name="OurClient"></param>
public void SendOurAppearance(IClientAPI OurClient) public void SendOurAppearance(IClientAPI OurClient)
{ {
ControllingClient.SendWearables(Wearables); m_controllingClient.SendWearables(Wearables);
//this.SendFullUpdateToAllClients(); //this.SendFullUpdateToAllClients();
//this.SendArrearanceToAllOtherAgents(); //this.SendArrearanceToAllOtherAgents();
m_scene.SendAllSceneObjectsToClient(this); m_scene.SendAllSceneObjectsToClient(this);
ControllingClient.SendViewerTime(m_scene.TimePhase); m_controllingClient.SendViewerTime(m_scene.TimePhase);
//Please don't remove the following code (at least not yet), just leave it commented out //Please don't remove the following code (at least not yet), just leave it commented out
//gives the user god powers, should help with debuging things in the future //gives the user god powers, should help with debuging things in the future
@ -651,7 +652,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="avatarInfo"></param> /// <param name="avatarInfo"></param>
public void SendAppearanceToOtherAgent(ScenePresence avatarInfo) public void SendAppearanceToOtherAgent(ScenePresence avatarInfo)
{ {
avatarInfo.ControllingClient.SendAppearance(ControllingClient.AgentId, visualParams, avatarInfo.m_controllingClient.SendAppearance(m_controllingClient.AgentId, visualParams,
m_textureEntry.ToBytes()); m_textureEntry.ToBytes());
} }
@ -667,8 +668,8 @@ namespace OpenSim.Region.Environment.Scenes
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
{ {
scenePresence.ControllingClient.SendAnimation(animID, seq, scenePresence.m_controllingClient.SendAnimation(animID, seq,
ControllingClient.AgentId); m_controllingClient.AgentId);
}); });
} }
@ -691,7 +692,7 @@ namespace OpenSim.Region.Environment.Scenes
posLastSignificantMove = AbsolutePosition; posLastSignificantMove = AbsolutePosition;
if (OnSignificantClientMovement != null) if (OnSignificantClientMovement != null)
{ {
OnSignificantClientMovement(ControllingClient); OnSignificantClientMovement(m_controllingClient);
NotifyMyCoarseLocationChange(); NotifyMyCoarseLocationChange();
} }
} }
@ -762,14 +763,14 @@ namespace OpenSim.Region.Environment.Scenes
if (neighbourRegion != null) if (neighbourRegion != null)
{ {
bool res = bool res =
m_scene.InformNeighbourOfCrossing(neighbourHandle, ControllingClient.AgentId, newpos, m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos,
_physActor.Flying); m_physicsActor.Flying);
if (res) if (res)
{ {
//TODO: following line is hard coded to port 9000, really need to change this as soon as possible //TODO: following line is hard coded to port 9000, really need to change this as soon as possible
AgentCircuitData circuitdata = ControllingClient.RequestClientInfo(); AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo();
string capsPath = Util.GetCapsURL(ControllingClient.AgentId); string capsPath = Util.GetCapsURL(m_controllingClient.AgentId);
ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
capsPath); capsPath);
MakeChildAgent(); MakeChildAgent();
m_scene.SendKillObject(m_localId); m_scene.SendKillObject(m_localId);
@ -850,7 +851,7 @@ namespace OpenSim.Region.Environment.Scenes
new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y,
AbsolutePosition.Z); AbsolutePosition.Z);
_physActor = scene.AddAvatar(pVec); m_physicsActor = scene.AddAvatar(pVec);
} }
} }
} }

View File

@ -52,8 +52,6 @@ namespace SimpleApp
m_log.Notice(m_log.LineInfo); m_log.Notice(m_log.LineInfo);
ScenePresence.PhysicsEngineFlying = true;
IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000); IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000);
RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost"); RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost");