diff options
author | gareth | 2007-03-04 01:57:52 +0000 |
---|---|---|
committer | gareth | 2007-03-04 01:57:52 +0000 |
commit | 412d7e098c424745c0c2ae1a6526c5b5d58b3180 (patch) | |
tree | adf1e02de27534503dcb3f7b4619d89366c2b8a5 /src/world/World.cs | |
parent | Keeping the MSVC project file up to date (diff) | |
download | opensim-SC_OLD-412d7e098c424745c0c2ae1a6526c5b5d58b3180.zip opensim-SC_OLD-412d7e098c424745c0c2ae1a6526c5b5d58b3180.tar.gz opensim-SC_OLD-412d7e098c424745c0c2ae1a6526c5b5d58b3180.tar.bz2 opensim-SC_OLD-412d7e098c424745c0c2ae1a6526c5b5d58b3180.tar.xz |
Fixed up bugs from patch in PREV:
Slow movement of avatar FIXED
Constant TerseObjectUpdates FIXED
Moving out of sim FIXED
Diffstat (limited to 'src/world/World.cs')
-rw-r--r-- | src/world/World.cs | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/world/World.cs b/src/world/World.cs index b261884..f32f9ef 100644 --- a/src/world/World.cs +++ b/src/world/World.cs | |||
@@ -50,17 +50,20 @@ namespace OpenSim.world | |||
50 | { | 50 | { |
51 | if(Entities[UUID].needupdate) { | 51 | if(Entities[UUID].needupdate) { |
52 | Entities[UUID].update(); | 52 | Entities[UUID].update(); |
53 | } | 53 | |
54 | if(Entities[UUID] is Avatar) { // FIXME: only send updates when avatar moves. | 54 | if(Entities[UUID] is Avatar) { |
55 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = Entities[UUID].CreateTerseBlock(); | 55 | Avatar avatar=(Avatar)Entities[UUID]; |
56 | foreach(OpenSimClient client in OpenSim_Main.sim.ClientThreads.Values) { | 56 | if((avatar.oldpos!=avatar.position) || (avatar.oldvel!=avatar.velocity) || avatar.walking) { |
57 | ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); | 57 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = Entities[UUID].CreateTerseBlock(); |
58 | terse.RegionData.RegionHandle = OpenSim_Main.cfg.RegionHandle; // FIXME | 58 | foreach(OpenSimClient client in OpenSim_Main.sim.ClientThreads.Values) { |
59 | terse.RegionData.TimeDilation = 0; | 59 | ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); |
60 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; | 60 | terse.RegionData.RegionHandle = OpenSim_Main.cfg.RegionHandle; // FIXME |
61 | terse.ObjectData[0] = terseBlock; | 61 | terse.RegionData.TimeDilation = 0; |
62 | client.OutPacket(terse); | 62 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; |
63 | } | 63 | terse.ObjectData[0] = terseBlock; |
64 | client.OutPacket(terse); | ||
65 | } | ||
66 | }} | ||
64 | } | 67 | } |
65 | } | 68 | } |
66 | } | 69 | } |