Instead of preserving old name in geom_name_map in change size or shape, use the Name property instead.

This is equivalent since the prim 'name' is never changed.  In fact, this propery is never used for prims
bulletsim
Justin Clark-Casey (justincc) 2011-08-01 06:52:52 +01:00
parent 40a78db182
commit f9d6a91252
1 changed files with 3 additions and 7 deletions

View File

@ -1510,7 +1510,7 @@ Console.WriteLine("changeadd 1");
} }
} }
_parent_scene.geom_name_map[prim_geom] = this.Name; _parent_scene.geom_name_map[prim_geom] = Name;
_parent_scene.actor_name_map[prim_geom] = this; _parent_scene.actor_name_map[prim_geom] = this;
changeSelectedStatus(timestep); changeSelectedStatus(timestep);
@ -1943,8 +1943,6 @@ Console.WriteLine(" JointCreateFixed");
m_log.DebugFormat("[ODE PRIM]: Called changesize"); m_log.DebugFormat("[ODE PRIM]: Called changesize");
#endif #endif
string oldname = _parent_scene.geom_name_map[prim_geom];
if (_size.X <= 0) _size.X = 0.01f; if (_size.X <= 0) _size.X = 0.01f;
if (_size.Y <= 0) _size.Y = 0.01f; if (_size.Y <= 0) _size.Y = 0.01f;
if (_size.Z <= 0) _size.Z = 0.01f; if (_size.Z <= 0) _size.Z = 0.01f;
@ -2009,7 +2007,7 @@ Console.WriteLine(" JointCreateFixed");
d.BodyEnable(Body); d.BodyEnable(Body);
} }
_parent_scene.geom_name_map[prim_geom] = oldname; _parent_scene.geom_name_map[prim_geom] = Name;
_parent_scene.actor_name_map[prim_geom] = this; _parent_scene.actor_name_map[prim_geom] = this;
changeSelectedStatus(timestamp); changeSelectedStatus(timestamp);
@ -2045,8 +2043,6 @@ Console.WriteLine(" JointCreateFixed");
public void changeshape(float timestamp) public void changeshape(float timestamp)
{ {
string oldname = _parent_scene.geom_name_map[prim_geom];
// Cleanup of old prim geometry and Bodies // Cleanup of old prim geometry and Bodies
if (IsPhysical && Body != IntPtr.Zero) if (IsPhysical && Body != IntPtr.Zero)
{ {
@ -2108,7 +2104,7 @@ Console.WriteLine(" JointCreateFixed");
} }
} }
_parent_scene.geom_name_map[prim_geom] = oldname; _parent_scene.geom_name_map[prim_geom] = Name;
_parent_scene.actor_name_map[prim_geom] = this; _parent_scene.actor_name_map[prim_geom] = this;
changeSelectedStatus(timestamp); changeSelectedStatus(timestamp);