aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world/Avatar.cs
diff options
context:
space:
mode:
authorgareth2007-03-04 19:12:07 +0000
committergareth2007-03-04 19:12:07 +0000
commitea28985d05160127a96184c2c9ac0ed94101a20b (patch)
treec7459331a3dd43006c2ffe3d909b72fe30b384b4 /src/world/Avatar.cs
parentImplemented chat (diff)
downloadopensim-SC_OLD-ea28985d05160127a96184c2c9ac0ed94101a20b.zip
opensim-SC_OLD-ea28985d05160127a96184c2c9ac0ed94101a20b.tar.gz
opensim-SC_OLD-ea28985d05160127a96184c2c9ac0ed94101a20b.tar.bz2
opensim-SC_OLD-ea28985d05160127a96184c2c9ac0ed94101a20b.tar.xz
Added MW's fix for smooth movement
Diffstat (limited to '')
-rw-r--r--src/world/Avatar.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/world/Avatar.cs b/src/world/Avatar.cs
index fbd78b7..6dcc1dd 100644
--- a/src/world/Avatar.cs
+++ b/src/world/Avatar.cs
@@ -145,13 +145,17 @@ namespace OpenSim.world
145 Array.Copy(pb, 0, bytes, i, pb.Length); 145 Array.Copy(pb, 0, bytes, i, pb.Length);
146 i += 12; 146 i += 12;
147 147
148
148 ushort ac = 32767; 149 ushort ac = 32767;
149 bytes[i++] = (byte)(ac % 256); // avatar.InternVelocityX 150 bytes[i++] = (byte)((ushort)(((this.velocity.X/128f)+1)*32767) % 256 );
150 bytes[i++] = (byte)((ac>> 8) % 256); 151 bytes[i++] = (byte)(((ushort)(((this.velocity.X/128f)+1)*32767) >> 8) % 256);
151 bytes[i++] = (byte)(ac % 256); // avatar.InternVelocityY 152 bytes[i++] = (byte)((ushort)(((this.velocity.Y/128f)+1)*32767) % 256);
152 bytes[i++] = (byte)((ac >> 8) % 256); 153 bytes[i++] = (byte)(((ushort)(((this.velocity.Y/128f)+1)*32767) >> 8) % 256);
153 bytes[i++] = (byte)(ac % 256); // avatar.InternVelocityZ 154 bytes[i++] = (byte)((ushort)(((this.velocity.Z/128f)+1)*32767) % 256);
154 bytes[i++] = (byte)((ac >> 8) % 256); 155 bytes[i++] = (byte)(((ushort)(((this.velocity.Z/128f)+1)*32767) >> 8) % 256);
156
157
158
155 159
156 //accel 160 //accel
157 bytes[i++] = (byte)(ac % 256); 161 bytes[i++] = (byte)(ac % 256);