diff options
author | Justin Clark-Casey (justincc) | 2011-08-01 05:34:02 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-01 05:43:04 +0100 |
commit | dfa2f7d7151ec0e3835c4a008897389353be1cb3 (patch) | |
tree | c76cd700de65b86b93c84db1014e3d56651f0ce2 /OpenSim/Region/Physics | |
parent | minor: indentation correction (diff) | |
download | opensim-SC-dfa2f7d7151ec0e3835c4a008897389353be1cb3.zip opensim-SC-dfa2f7d7151ec0e3835c4a008897389353be1cb3.tar.gz opensim-SC-dfa2f7d7151ec0e3835c4a008897389353be1cb3.tar.bz2 opensim-SC-dfa2f7d7151ec0e3835c4a008897389353be1cb3.tar.xz |
If a prim changes size or shape, add actor to _parent_scene.actor_name_map with new prim_geom key, as the old one becomes invalid.
This resolves http://opensimulator.org/mantis/view.php?id=5603 where changing size or shape would stop collision_start being fired in a running script.
In both this and existing code we are not removing old actors from actor_name_map when the existing prim_geom is removed, which leads to a small memory leak over time.
This needs to be fixed.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index fdb95cf..e18e1b4 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -1481,7 +1481,7 @@ Console.WriteLine("changeadd 1"); | |||
1481 | } | 1481 | } |
1482 | 1482 | ||
1483 | _parent_scene.geom_name_map[prim_geom] = this.Name; | 1483 | _parent_scene.geom_name_map[prim_geom] = this.Name; |
1484 | _parent_scene.actor_name_map[prim_geom] = (PhysicsActor)this; | 1484 | _parent_scene.actor_name_map[prim_geom] = this; |
1485 | 1485 | ||
1486 | changeSelectedStatus(timestep); | 1486 | changeSelectedStatus(timestep); |
1487 | 1487 | ||
@@ -1991,6 +1991,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
1991 | } | 1991 | } |
1992 | 1992 | ||
1993 | _parent_scene.geom_name_map[prim_geom] = oldname; | 1993 | _parent_scene.geom_name_map[prim_geom] = oldname; |
1994 | _parent_scene.actor_name_map[prim_geom] = this; | ||
1994 | 1995 | ||
1995 | changeSelectedStatus(timestamp); | 1996 | changeSelectedStatus(timestamp); |
1996 | if (childPrim) | 1997 | if (childPrim) |
@@ -2095,7 +2096,9 @@ Console.WriteLine(" JointCreateFixed"); | |||
2095 | d.BodyEnable(Body); | 2096 | d.BodyEnable(Body); |
2096 | } | 2097 | } |
2097 | } | 2098 | } |
2099 | |||
2098 | _parent_scene.geom_name_map[prim_geom] = oldname; | 2100 | _parent_scene.geom_name_map[prim_geom] = oldname; |
2101 | _parent_scene.actor_name_map[prim_geom] = this; | ||
2099 | 2102 | ||
2100 | changeSelectedStatus(timestamp); | 2103 | changeSelectedStatus(timestamp); |
2101 | if (childPrim) | 2104 | if (childPrim) |