aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Scenes/Entity.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.Region/Scenes/Entity.cs')
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Entity.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/OpenSim.Region/Scenes/Entity.cs b/OpenSim/OpenSim.Region/Scenes/Entity.cs
index d4c981a..007bdaf 100644
--- a/OpenSim/OpenSim.Region/Scenes/Entity.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Entity.cs
@@ -93,6 +93,41 @@ namespace OpenSim.Region.Scenes
93 } 93 }
94 } 94 }
95 95
96 public virtual LLVector3 Velocity
97 {
98 get
99 {
100 if (this._physActor != null)
101 {
102 velocity.X = _physActor.Velocity.X;
103 velocity.Y = _physActor.Velocity.Y;
104 velocity.Z = _physActor.Velocity.Z;
105 }
106
107 return velocity;
108 }
109 set
110 {
111 if (this._physActor != null)
112 {
113 try
114 {
115 lock (this.m_world.SyncRoot)
116 {
117
118 this._physActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z);
119 }
120 }
121 catch (Exception e)
122 {
123 Console.WriteLine(e.Message);
124 }
125 }
126
127 velocity = value;
128 }
129 }
130
96 /// <summary> 131 /// <summary>
97 /// Creates a new Entity (should not occur on it's own) 132 /// Creates a new Entity (should not occur on it's own)
98 /// </summary> 133 /// </summary>