aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs12
-rw-r--r--OpenSim.Physics/Manager/PhysicsScene.cs7
-rw-r--r--OpenSim.Physics/OdePlugin/OdePlugin.cs5
-rw-r--r--OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs5
-rw-r--r--OpenSim.RegionServer/world/Avatar.cs4
-rw-r--r--OpenSim.RegionServer/world/World.cs4
6 files changed, 36 insertions, 1 deletions
diff --git a/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index d4515ca..ea2bd9b 100644
--- a/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -84,7 +84,17 @@ namespace OpenSim.Physics.BasicPhysicsPlugin
84 _actors.Add(act); 84 _actors.Add(act);
85 return act; 85 return act;
86 } 86 }
87 87
88 public override void RemoveAvatar(PhysicsActor actor)
89 {
90 BasicActor act = (BasicActor)actor;
91 if(_actors.Contains(act))
92 {
93 _actors.Remove(act);
94 }
95
96 }
97
88 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 98 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
89 { 99 {
90 return null; 100 return null;
diff --git a/OpenSim.Physics/Manager/PhysicsScene.cs b/OpenSim.Physics/Manager/PhysicsScene.cs
index b79cc46..7dab4e1 100644
--- a/OpenSim.Physics/Manager/PhysicsScene.cs
+++ b/OpenSim.Physics/Manager/PhysicsScene.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Physics.Manager
44 44
45 public abstract PhysicsActor AddAvatar(PhysicsVector position); 45 public abstract PhysicsActor AddAvatar(PhysicsVector position);
46 46
47 public abstract void RemoveAvatar(PhysicsActor actor);
48
47 public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size); 49 public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size);
48 50
49 public abstract void Simulate(float timeStep); 51 public abstract void Simulate(float timeStep);
@@ -70,6 +72,11 @@ namespace OpenSim.Physics.Manager
70 return PhysicsActor.Null; 72 return PhysicsActor.Null;
71 } 73 }
72 74
75 public override void RemoveAvatar(PhysicsActor actor)
76 {
77
78 }
79
73 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 80 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
74 { 81 {
75 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "NullPhysicsScene : AddPrim({0},{1})", position, size); 82 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "NullPhysicsScene : AddPrim({0},{1})", position, size);
diff --git a/OpenSim.Physics/OdePlugin/OdePlugin.cs b/OpenSim.Physics/OdePlugin/OdePlugin.cs
index 4164d87..8ddfd5c 100644
--- a/OpenSim.Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim.Physics/OdePlugin/OdePlugin.cs
@@ -131,6 +131,11 @@ namespace OpenSim.Physics.OdePlugin
131 return newAv; 131 return newAv;
132 } 132 }
133 133
134 public override void RemoveAvatar(PhysicsActor actor)
135 {
136
137 }
138
134 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 139 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
135 { 140 {
136 PhysicsVector pos = new PhysicsVector(); 141 PhysicsVector pos = new PhysicsVector();
diff --git a/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs
index 10e92fe..dff1ee2 100644
--- a/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs
+++ b/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs
@@ -121,6 +121,11 @@ namespace OpenSim.Physics.PhysXPlugin
121 _characters.Add(act); 121 _characters.Add(act);
122 return act; 122 return act;
123 } 123 }
124
125 public override void RemoveAvatar(PhysicsActor actor)
126 {
127
128 }
124 129
125 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 130 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
126 { 131 {
diff --git a/OpenSim.RegionServer/world/Avatar.cs b/OpenSim.RegionServer/world/Avatar.cs
index f8a1a5a..c684c45 100644
--- a/OpenSim.RegionServer/world/Avatar.cs
+++ b/OpenSim.RegionServer/world/Avatar.cs
@@ -72,6 +72,10 @@ namespace OpenSim.world
72 { 72 {
73 this._physActor = value; 73 this._physActor = value;
74 } 74 }
75 get
76 {
77 return _physActor;
78 }
75 } 79 }
76 80
77 public override void addForces() 81 public override void addForces()
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs
index e89f8f4..4dfe0e9 100644
--- a/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim.RegionServer/world/World.cs
@@ -600,6 +600,10 @@ namespace OpenSim.world
600 { 600 {
601 Avatars.Remove(agentClient.AgentID); 601 Avatars.Remove(agentClient.AgentID);
602 } 602 }
603 if (agentClient.ClientAvatar.PhysActor != null)
604 {
605 this.phyScene.RemoveAvatar(agentClient.ClientAvatar.PhysActor);
606 }
603 } 607 }
604 catch (Exception e) 608 catch (Exception e)
605 { 609 {