From: Jorrit T. <jo...@us...> - 2004-09-02 04:43:48
|
Update of /cvsroot/planeshift/planeshift/src/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18365/src/client Modified Files: entitylabels.cpp Log Message: Fixed a bug in the entity labels where they would use a material name based on the first row of text set in the entity label. This would occasionally match the name of a real texture (like one for a cal3d model) and in that case the model texture would be overwritten. Fixed by prepending 'matlabel_' in front of the entity label material name (and texture). Index: entitylabels.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/entitylabels.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** entitylabels.cpp 23 Aug 2004 14:21:05 -0000 1.34 --- entitylabels.cpp 2 Sep 2004 04:43:39 -0000 1.35 *************** *** 343,350 **** // create material for our sprite csColor transp(51/255.0F,51/255.0F,254/255.0F); ! textWrap = engine->CreateBlackTexture(rows[0].text, textureWidth, textureHeight, &transp , CS_TEXTURE_3D); textWrap->Register(txtmgr); ! materWrap = engine->CreateMaterial(rows[0].text, textWrap); materWrap->Register(txtmgr); --- 343,352 ---- // create material for our sprite csColor transp(51/255.0F,51/255.0F,254/255.0F); ! csString matname = "matlabel_"; ! matname += rows[0].text; ! textWrap = engine->CreateBlackTexture(matname, textureWidth, textureHeight, &transp , CS_TEXTURE_3D); textWrap->Register(txtmgr); ! materWrap = engine->CreateMaterial(matname, textWrap); materWrap->Register(txtmgr); |