partial update for new mesh asset format - handle both old and new formats for physics mesh

bulletsim
dahlia 2011-06-10 00:38:38 -07:00
parent 9149ef6c89
commit 387b228d68
1 changed files with 5 additions and 1 deletions

View File

@ -303,7 +303,11 @@ namespace OpenSim.Region.Physics.Meshing
if (meshOsd is OSDMap) if (meshOsd is OSDMap)
{ {
OSDMap map = (OSDMap)meshOsd; OSDMap map = (OSDMap)meshOsd;
OSDMap physicsParms = (OSDMap)map["physics_shape"]; OSDMap physicsParms = (OSDMap)map["physics_shape"]; // old asset format
if (physicsParms.Count == 0)
physicsParms = (OSDMap)map["physics_mesh"]; // new asset format
int physOffset = physicsParms["offset"].AsInteger() + (int)start; int physOffset = physicsParms["offset"].AsInteger() + (int)start;
int physSize = physicsParms["size"].AsInteger(); int physSize = physicsParms["size"].AsInteger();