mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
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.
This commit is contained in:
@@ -1481,7 +1481,7 @@ Console.WriteLine("changeadd 1");
|
||||
}
|
||||
|
||||
_parent_scene.geom_name_map[prim_geom] = this.Name;
|
||||
_parent_scene.actor_name_map[prim_geom] = (PhysicsActor)this;
|
||||
_parent_scene.actor_name_map[prim_geom] = this;
|
||||
|
||||
changeSelectedStatus(timestep);
|
||||
|
||||
@@ -1991,6 +1991,7 @@ Console.WriteLine(" JointCreateFixed");
|
||||
}
|
||||
|
||||
_parent_scene.geom_name_map[prim_geom] = oldname;
|
||||
_parent_scene.actor_name_map[prim_geom] = this;
|
||||
|
||||
changeSelectedStatus(timestamp);
|
||||
if (childPrim)
|
||||
@@ -2095,7 +2096,9 @@ Console.WriteLine(" JointCreateFixed");
|
||||
d.BodyEnable(Body);
|
||||
}
|
||||
}
|
||||
|
||||
_parent_scene.geom_name_map[prim_geom] = oldname;
|
||||
_parent_scene.actor_name_map[prim_geom] = this;
|
||||
|
||||
changeSelectedStatus(timestamp);
|
||||
if (childPrim)
|
||||
|
||||
Reference in New Issue
Block a user