From b968ff83a998b82d8bce9a4175178c7cd710be19 Mon Sep 17 00:00:00 2001 From: gareth Date: Sat, 3 Mar 2007 01:49:56 +0000 Subject: Begun porting a (STABLE) version of MW's movement code --- src/world/Avatar.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/world/Avatar.cs') 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 public string firstname; public string lastname; public OpenSimClient ControllingClient; + public uint CurrentKeyMask; + private libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock AvatarTemplate; public Avatar(OpenSimClient TheClient) { @@ -21,7 +23,21 @@ namespace OpenSim.world } public void update() { - base.update(); + lock(this) { + base.update(); + + if((this.CurrentKeyMask & (uint)MainAvatar.AgentUpdateFlags.AGENT_CONTROL_AT_POS) != 0) { + if((this.velocity.X>230) & (this.velocity.Y>230)) { + this.velocity.X=230; + this.velocity.Y=230; + this.velocity.Z=0; + } + } else { + this.velocity.X=0; + this.velocity.Y=0; + this.velocity.Z=0; + } + } } private void SetupTemplate(string name) -- cgit v1.1