From 0e6ded8714007d173c28eefdc510f4c460928345 Mon Sep 17 00:00:00 2001 From: MW Date: Fri, 23 Mar 2007 18:54:42 +0000 Subject: Added Fly animation --- OpenSim.RegionServer/world/Avatar.cs | 25 +++++++++++++++++++++---- bin/PhysX-wrapper.dll | Bin 57344 -> 57344 bytes 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/OpenSim.RegionServer/world/Avatar.cs b/OpenSim.RegionServer/world/Avatar.cs index 792e2ff..c8a4539 100644 --- a/OpenSim.RegionServer/world/Avatar.cs +++ b/OpenSim.RegionServer/world/Avatar.cs @@ -274,10 +274,23 @@ namespace OpenSim.world { if (((uint)pack.AgentData.ControlFlags & (uint)MainAvatar.AgentUpdateFlags.AGENT_CONTROL_FLY) != 0) { + if (this._physActor.Flying == false) + { + this.current_anim = Animations.AnimsLLUUID["ANIM_AGENT_FLY"]; + this.anim_seq = 1; + this.SendAnimPack(); + } this._physActor.Flying = true; + } else { + if (this._physActor.Flying == true) + { + this.current_anim = Animations.AnimsLLUUID["ANIM_AGENT_STAND"]; + this.anim_seq = 1; + this.SendAnimPack(); + } this._physActor.Flying = false; } if (((uint)pack.AgentData.ControlFlags & (uint)MainAvatar.AgentUpdateFlags.AGENT_CONTROL_AT_POS) != 0) @@ -286,7 +299,7 @@ namespace OpenSim.world if (((movementflag & 1) == 0) || (q != this.bodyRot)) { - if ((movementflag & 1) == 0) + if (((movementflag & 1) == 0) && (!this._physActor.Flying)) { this.current_anim = Animations.AnimsLLUUID["ANIM_AGENT_WALK"]; this.anim_seq = 1; @@ -395,10 +408,14 @@ namespace OpenSim.world this.forcesList.Add(newVelocity); movementflag = 0; // We're standing still, so make it show! - this.current_anim = Animations.AnimsLLUUID["ANIM_AGENT_STAND"]; - this.anim_seq = 1; - this.SendAnimPack(); + if (this._physActor.Flying == false) + { + this.current_anim = Animations.AnimsLLUUID["ANIM_AGENT_STAND"]; + this.anim_seq = 1; + this.SendAnimPack(); + } this.movementflag = 16; + } } } diff --git a/bin/PhysX-wrapper.dll b/bin/PhysX-wrapper.dll index 594bd89..d7a4002 100644 Binary files a/bin/PhysX-wrapper.dll and b/bin/PhysX-wrapper.dll differ -- cgit v1.1