aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world/Avatar.cs
diff options
context:
space:
mode:
authorgareth2007-03-03 01:49:56 +0000
committergareth2007-03-03 01:49:56 +0000
commitb968ff83a998b82d8bce9a4175178c7cd710be19 (patch)
tree4e3808e89610bede8ad63879b5fd3968f3c2800e /src/world/Avatar.cs
parentLock the world so we don't cause nastiness and crashes (diff)
downloadopensim-SC_OLD-b968ff83a998b82d8bce9a4175178c7cd710be19.zip
opensim-SC_OLD-b968ff83a998b82d8bce9a4175178c7cd710be19.tar.gz
opensim-SC_OLD-b968ff83a998b82d8bce9a4175178c7cd710be19.tar.bz2
opensim-SC_OLD-b968ff83a998b82d8bce9a4175178c7cd710be19.tar.xz
Begun porting a (STABLE) version of MW's movement code
Diffstat (limited to 'src/world/Avatar.cs')
-rw-r--r--src/world/Avatar.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/world/Avatar.cs b/src/world/Avatar.cs
index f3905cd..fc1b4a2 100644
--- a/src/world/Avatar.cs
+++ b/src/world/Avatar.cs
@@ -12,6 +12,8 @@ namespace OpenSim.world
12 public string firstname; 12 public string firstname;
13 public string lastname; 13 public string lastname;
14 public OpenSimClient ControllingClient; 14 public OpenSimClient ControllingClient;
15 public uint CurrentKeyMask;
16
15 private libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock AvatarTemplate; 17 private libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock AvatarTemplate;
16 18
17 public Avatar(OpenSimClient TheClient) { 19 public Avatar(OpenSimClient TheClient) {
@@ -21,7 +23,21 @@ namespace OpenSim.world
21 } 23 }
22 24
23 public void update() { 25 public void update() {
24 base.update(); 26 lock(this) {
27 base.update();
28
29 if((this.CurrentKeyMask & (uint)MainAvatar.AgentUpdateFlags.AGENT_CONTROL_AT_POS) != 0) {
30 if((this.velocity.X>230) & (this.velocity.Y>230)) {
31 this.velocity.X=230;
32 this.velocity.Y=230;
33 this.velocity.Z=0;
34 }
35 } else {
36 this.velocity.X=0;
37 this.velocity.Y=0;
38 this.velocity.Z=0;
39 }
40 }
25 } 41 }
26 42
27 private void SetupTemplate(string name) 43 private void SetupTemplate(string name)