Resolve issue #163

Fixed and assert on changing material, and we now map the material to the MATMGR by name instead of type.
This commit is contained in:
thecelloman 2013-03-27 21:36:17 -04:00
parent 769268784f
commit 7e5ddf4ca2
3 changed files with 28 additions and 4 deletions

View file

@ -5127,8 +5127,8 @@ DefineEngineMethod( ShapeBase, changeMaterial, void, ( const char* mapTo, Materi
newMat->mMapTo = mapTo;
// Map the material in the in the matmgr
MATMGR->mapMaterial( mapTo, newMat->mMapTo );
// Map the material by name in the matmgr
MATMGR->mapMaterial( mapTo, newMat->getName() );
// Replace instances with the new material being traded in. For ShapeBase
// class we have to update the server/client objects separately so both