diff options
* Removed Unused 'Entity' superclass
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 72 |
1 files changed, 71 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index c75136f..c0b9a35 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -38,7 +38,7 @@ using OpenSim.Region.Physics.Manager; | |||
38 | 38 | ||
39 | namespace OpenSim.Region.Environment.Scenes | 39 | namespace OpenSim.Region.Environment.Scenes |
40 | { | 40 | { |
41 | public partial class ScenePresence : Entity | 41 | public partial class ScenePresence : EntityBase |
42 | { | 42 | { |
43 | public static AvatarAnimations Animations; | 43 | public static AvatarAnimations Animations; |
44 | public static byte[] DefaultTexture; | 44 | public static byte[] DefaultTexture; |
@@ -132,11 +132,81 @@ namespace OpenSim.Region.Environment.Scenes | |||
132 | } | 132 | } |
133 | 133 | ||
134 | private readonly IClientAPI m_controllingClient; | 134 | private readonly IClientAPI m_controllingClient; |
135 | protected PhysicsActor m_physicsActor; | ||
136 | |||
135 | public IClientAPI _ControllingClient | 137 | public IClientAPI _ControllingClient |
136 | { | 138 | { |
137 | get { return m_controllingClient; } | 139 | get { return m_controllingClient; } |
138 | } | 140 | } |
139 | 141 | ||
142 | public LLVector3 AbsolutePosition | ||
143 | { | ||
144 | get | ||
145 | { | ||
146 | if (m_physicsActor != null) | ||
147 | { | ||
148 | m_pos.X = m_physicsActor.Position.X; | ||
149 | m_pos.Y = m_physicsActor.Position.Y; | ||
150 | m_pos.Z = m_physicsActor.Position.Z; | ||
151 | } | ||
152 | |||
153 | return m_pos; | ||
154 | } | ||
155 | set | ||
156 | { | ||
157 | if (m_physicsActor != null) | ||
158 | { | ||
159 | try | ||
160 | { | ||
161 | lock (m_scene.SyncRoot) | ||
162 | { | ||
163 | m_physicsActor.Position = new PhysicsVector(value.X, value.Y, value.Z); | ||
164 | } | ||
165 | } | ||
166 | catch (Exception e) | ||
167 | { | ||
168 | Console.WriteLine(e.Message); | ||
169 | } | ||
170 | } | ||
171 | |||
172 | m_pos = value; | ||
173 | } | ||
174 | } | ||
175 | |||
176 | public LLVector3 Velocity | ||
177 | { | ||
178 | get | ||
179 | { | ||
180 | if (m_physicsActor != null) | ||
181 | { | ||
182 | m_velocity.X = m_physicsActor.Velocity.X; | ||
183 | m_velocity.Y = m_physicsActor.Velocity.Y; | ||
184 | m_velocity.Z = m_physicsActor.Velocity.Z; | ||
185 | } | ||
186 | |||
187 | return m_velocity; | ||
188 | } | ||
189 | set | ||
190 | { | ||
191 | if (m_physicsActor != null) | ||
192 | { | ||
193 | try | ||
194 | { | ||
195 | lock (m_scene.SyncRoot) | ||
196 | { | ||
197 | m_physicsActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); | ||
198 | } | ||
199 | } | ||
200 | catch (Exception e) | ||
201 | { | ||
202 | Console.WriteLine(e.Message); | ||
203 | } | ||
204 | } | ||
205 | |||
206 | m_velocity = value; | ||
207 | } | ||
208 | } | ||
209 | |||
140 | #endregion | 210 | #endregion |
141 | 211 | ||
142 | #region Constructor(s) | 212 | #region Constructor(s) |