diff options
author | mingchen | 2007-06-08 03:54:03 +0000 |
---|---|---|
committer | mingchen | 2007-06-08 03:54:03 +0000 |
commit | 269ff893df525ad5ea8ad8fbe2528f7045dec8d9 (patch) | |
tree | 6b3957c356c76a59b360bf938ddea9c64932a26e /OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs | |
parent | *Added basic support for EstateOwnerMessage (diff) | |
download | opensim-SC-269ff893df525ad5ea8ad8fbe2528f7045dec8d9.zip opensim-SC-269ff893df525ad5ea8ad8fbe2528f7045dec8d9.tar.gz opensim-SC-269ff893df525ad5ea8ad8fbe2528f7045dec8d9.tar.bz2 opensim-SC-269ff893df525ad5ea8ad8fbe2528f7045dec8d9.tar.xz |
*Added Estate Tools for terrain texturing, terrain texturing heights per corner, water height, region flags, etc basic settings
*Parcel now sends ParcelProperties when the owner changes information as soon as the information is changed
Diffstat (limited to '')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs | 61 |
1 files changed, 6 insertions, 55 deletions
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs b/OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs index 65a9a63..a64ee9e 100644 --- a/OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs +++ b/OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs | |||
@@ -66,24 +66,15 @@ namespace OpenSim.RegionServer.Simulator | |||
66 | 66 | ||
67 | private int positionParcelHoverLocalID = -1; //Local ID of the last parcel they were over | 67 | private int positionParcelHoverLocalID = -1; //Local ID of the last parcel they were over |
68 | private int parcelUpdateSequenceIncrement = 1; | 68 | private int parcelUpdateSequenceIncrement = 1; |
69 | private ulong m_regionHandle; | 69 | |
70 | //private Dictionary<uint, ClientView> m_clientThreads; | ||
71 | private string m_regionName; | ||
72 | private ushort m_regionWaterHeight; | ||
73 | private bool m_regionTerraform; | ||
74 | private bool childAvatar = false; | 70 | private bool childAvatar = false; |
75 | 71 | ||
76 | public Avatar(ClientView TheClient, World world, string regionName, Dictionary<uint, ClientView> clientThreads, ulong regionHandle, bool regionTerraform, ushort regionWater) | 72 | public Avatar(ClientView TheClient, World world) |
77 | { | 73 | { |
78 | m_world = world; | 74 | m_world = world; |
79 | // m_clientThreads = clientThreads; | 75 | ControllingClient = TheClient; |
80 | m_regionName = regionName; | ||
81 | m_regionHandle = regionHandle; | ||
82 | m_regionTerraform = regionTerraform; | ||
83 | m_regionWaterHeight = regionWater; | ||
84 | 76 | ||
85 | OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs - Loading details from grid (DUMMY)"); | 77 | OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs - Loading details from grid (DUMMY)"); |
86 | ControllingClient = TheClient; | ||
87 | localid = 8880000 + (this.m_world._localNumber++); | 78 | localid = 8880000 + (this.m_world._localNumber++); |
88 | Pos = ControllingClient.startpos; | 79 | Pos = ControllingClient.startpos; |
89 | visualParams = new byte[218]; | 80 | visualParams = new byte[218]; |
@@ -133,7 +124,7 @@ namespace OpenSim.RegionServer.Simulator | |||
133 | this._physActor.Velocity = new PhysicsVector(0, 0, 0); | 124 | this._physActor.Velocity = new PhysicsVector(0, 0, 0); |
134 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock(); | 125 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock(); |
135 | ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); | 126 | ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); |
136 | terse.RegionData.RegionHandle = m_regionHandle; // FIXME | 127 | terse.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle; |
137 | terse.RegionData.TimeDilation = 64096; | 128 | terse.RegionData.TimeDilation = 64096; |
138 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; | 129 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; |
139 | terse.ObjectData[0] = terseBlock; | 130 | terse.ObjectData[0] = terseBlock; |
@@ -251,7 +242,7 @@ namespace OpenSim.RegionServer.Simulator | |||
251 | AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); | 242 | AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); |
252 | mov.AgentData.SessionID = this.ControllingClient.SessionID; | 243 | mov.AgentData.SessionID = this.ControllingClient.SessionID; |
253 | mov.AgentData.AgentID = this.ControllingClient.AgentID; | 244 | mov.AgentData.AgentID = this.ControllingClient.AgentID; |
254 | mov.Data.RegionHandle = this.m_regionHandle; | 245 | mov.Data.RegionHandle = this.m_world.m_regInfo.RegionHandle; |
255 | // TODO - dynamicalise this stuff | 246 | // TODO - dynamicalise this stuff |
256 | mov.Data.Timestamp = 1172750370; | 247 | mov.Data.Timestamp = 1172750370; |
257 | mov.Data.Position = this.ControllingClient.startpos; | 248 | mov.Data.Position = this.ControllingClient.startpos; |
@@ -415,47 +406,7 @@ namespace OpenSim.RegionServer.Simulator | |||
415 | } | 406 | } |
416 | } | 407 | } |
417 | 408 | ||
418 | //really really should be moved somewhere else (RegionInfo.cs ?) | 409 | |
419 | public void SendRegionHandshake(World regionInfo) | ||
420 | { | ||
421 | OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet"); | ||
422 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; | ||
423 | RegionHandshakePacket handshake = new RegionHandshakePacket(); | ||
424 | |||
425 | OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details"); | ||
426 | handshake.RegionInfo.BillableFactor = 0; | ||
427 | handshake.RegionInfo.IsEstateManager = false; | ||
428 | handshake.RegionInfo.TerrainHeightRange00 = regionInfo.m_regInfo.estateSettings.terrainHeightRangeNW; | ||
429 | handshake.RegionInfo.TerrainHeightRange01 = regionInfo.m_regInfo.estateSettings.terrainHeightRangeNE; | ||
430 | handshake.RegionInfo.TerrainHeightRange10 = regionInfo.m_regInfo.estateSettings.terrainHeightRangeSW; | ||
431 | handshake.RegionInfo.TerrainHeightRange11 = regionInfo.m_regInfo.estateSettings.terrainHeightRangeSE; | ||
432 | handshake.RegionInfo.TerrainStartHeight00 = regionInfo.m_regInfo.estateSettings.terrainStartHeightNW; | ||
433 | handshake.RegionInfo.TerrainStartHeight01 = regionInfo.m_regInfo.estateSettings.terrainStartHeightNE; | ||
434 | handshake.RegionInfo.TerrainStartHeight10 = regionInfo.m_regInfo.estateSettings.terrainStartHeightSW; | ||
435 | handshake.RegionInfo.TerrainStartHeight11 = regionInfo.m_regInfo.estateSettings.terrainStartHeightSE; | ||
436 | handshake.RegionInfo.SimAccess = 13; | ||
437 | handshake.RegionInfo.WaterHeight = m_regionWaterHeight; | ||
438 | uint regionFlags = 72458694; | ||
439 | if (this.m_regionTerraform) | ||
440 | { | ||
441 | regionFlags -= 64; | ||
442 | } | ||
443 | handshake.RegionInfo.RegionFlags = regionFlags; | ||
444 | handshake.RegionInfo.SimName = _enc.GetBytes(m_regionName + "\0"); | ||
445 | handshake.RegionInfo.SimOwner = regionInfo.m_regInfo.MasterAvatarAssignedUUID; | ||
446 | handshake.RegionInfo.TerrainBase0 = regionInfo.m_regInfo.estateSettings.terrainBase0; | ||
447 | handshake.RegionInfo.TerrainBase1 = regionInfo.m_regInfo.estateSettings.terrainBase1; | ||
448 | handshake.RegionInfo.TerrainBase2 = regionInfo.m_regInfo.estateSettings.terrainBase2; | ||
449 | handshake.RegionInfo.TerrainBase3 = regionInfo.m_regInfo.estateSettings.terrainBase3; | ||
450 | handshake.RegionInfo.TerrainDetail0 = regionInfo.m_regInfo.estateSettings.terrainDetail0; | ||
451 | handshake.RegionInfo.TerrainDetail1 = regionInfo.m_regInfo.estateSettings.terrainDetail1; | ||
452 | handshake.RegionInfo.TerrainDetail2 = regionInfo.m_regInfo.estateSettings.terrainDetail2; | ||
453 | handshake.RegionInfo.TerrainDetail3 = regionInfo.m_regInfo.estateSettings.terrainDetail3; | ||
454 | handshake.RegionInfo.CacheID = new LLUUID("545ec0a5-5751-1026-8a0b-216e38a7ab37"); | ||
455 | |||
456 | OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet"); | ||
457 | this.ControllingClient.OutPacket(handshake); | ||
458 | } | ||
459 | 410 | ||
460 | public static void LoadAnims() | 411 | public static void LoadAnims() |
461 | { | 412 | { |