diff options
author | lbsa71 | 2007-09-19 04:19:27 +0000 |
---|---|---|
committer | lbsa71 | 2007-09-19 04:19:27 +0000 |
commit | 2afbf8b22b1548c7994981acf92882c6d9628bb9 (patch) | |
tree | aae0d8494f800b7d23748069f108e606358cd5d1 /OpenSim/Region/Environment/Scenes/ScenePresence.cs | |
parent | * Deleted unused RegionManager.cs (diff) | |
download | opensim-SC_OLD-2afbf8b22b1548c7994981acf92882c6d9628bb9.zip opensim-SC_OLD-2afbf8b22b1548c7994981acf92882c6d9628bb9.tar.gz opensim-SC_OLD-2afbf8b22b1548c7994981acf92882c6d9628bb9.tar.bz2 opensim-SC_OLD-2afbf8b22b1548c7994981acf92882c6d9628bb9.tar.xz |
* Added AddToPhysicalScene and RemoveFromPhysicalScene and added to MakeAvatar and MakeChildAgent respectively
* Removed unused m_child from ClientView
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 64c6eaa..811c962 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -265,17 +265,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
265 | } | 265 | } |
266 | } | 266 | } |
267 | 267 | ||
268 | /// <summary> | ||
269 | /// | ||
270 | /// </summary> | ||
271 | /// <param name="pos"></param> | ||
272 | public void MakeAvatar(LLVector3 pos, bool isFlying) | 268 | public void MakeAvatar(LLVector3 pos, bool isFlying) |
273 | { | 269 | { |
274 | //this.childAvatar = false; | ||
275 | AbsolutePosition = pos; | ||
276 | _physActor.Flying = isFlying; | ||
277 | newAvatar = true; | 270 | newAvatar = true; |
278 | childAgent = false; | 271 | childAgent = false; |
272 | |||
273 | AbsolutePosition = pos; | ||
274 | |||
275 | AddToPhysicalScene( ); | ||
276 | _physActor.Flying = isFlying; | ||
277 | |||
278 | |||
279 | m_scene.SendAllSceneObjectsToClient(this); | 279 | m_scene.SendAllSceneObjectsToClient(this); |
280 | } | 280 | } |
281 | 281 | ||
@@ -283,9 +283,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
283 | { | 283 | { |
284 | Velocity = new LLVector3(0, 0, 0); | 284 | Velocity = new LLVector3(0, 0, 0); |
285 | childAgent = true; | 285 | childAgent = true; |
286 | |||
287 | RemoveFromPhysicalScene(); | ||
288 | |||
286 | //this.Pos = new LLVector3(128, 128, 70); | 289 | //this.Pos = new LLVector3(128, 128, 70); |
287 | } | 290 | } |
288 | 291 | ||
292 | private void RemoveFromPhysicalScene() | ||
293 | { | ||
294 | m_scene.phyScene.RemoveAvatar( this.PhysActor ); | ||
295 | } | ||
296 | |||
289 | /// <summary> | 297 | /// <summary> |
290 | /// | 298 | /// |
291 | /// </summary> | 299 | /// </summary> |
@@ -832,7 +840,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
832 | 840 | ||
833 | public override void SetText(string text, Vector3 color, double alpha) | 841 | public override void SetText(string text, Vector3 color, double alpha) |
834 | { | 842 | { |
835 | throw new Exception("The method or operation is not implemented."); | 843 | throw new Exception("Can't set Text on avatar."); |
844 | } | ||
845 | |||
846 | public void AddToPhysicalScene( ) | ||
847 | { | ||
848 | PhysicsScene scene = m_scene.phyScene; | ||
849 | |||
850 | PhysicsVector pVec = | ||
851 | new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, | ||
852 | AbsolutePosition.Z); | ||
853 | |||
854 | _physActor = scene.AddAvatar(pVec); | ||
836 | } | 855 | } |
837 | } | 856 | } |
838 | } \ No newline at end of file | 857 | } \ No newline at end of file |