| 612 |
if (vObj.node == null && vObj.updateFullYN) |
if (vObj.node == null && vObj.updateFullYN) |
| 613 |
{ |
{ |
| 614 |
|
|
|
|
|
| 615 |
AnimatedMesh avmesh = smgr.GetMesh(avatarMesh); |
AnimatedMesh avmesh = smgr.GetMesh(avatarMesh); |
| 616 |
|
|
| 617 |
|
bool isTextured = false; |
| 618 |
|
int numTextures = 0; |
| 619 |
|
int mbcount = avmesh.GetMesh(0).MeshBufferCount; |
| 620 |
|
for (int j = 0; j < mbcount; j++) |
| 621 |
|
{ |
| 622 |
|
Texture texDriver = driver.GetTexture(j.ToString() + "-" + avatarMaterial); |
| 623 |
|
numTextures += texDriver == null ? 0 : 1; |
| 624 |
|
avmesh.GetMesh(0).GetMeshBuffer(j).Material.Texture1 = texDriver; |
| 625 |
|
avmesh.GetMesh(0).GetMeshBuffer(j).Material.SpecularColor = new Color(255, 128, 128, 128); |
| 626 |
|
avmesh.GetMesh(0).GetMeshBuffer(j).Material.AmbientColor = new Color(255, 128, 128, 128); |
| 627 |
|
avmesh.GetMesh(0).GetMeshBuffer(j).Material.EmissiveColor = new Color(255, 128, 128, 128); |
| 628 |
|
avmesh.GetMesh(0).GetMeshBuffer(j).Material.Shininess = 0; |
| 629 |
|
} |
| 630 |
|
if (numTextures == mbcount) |
| 631 |
|
isTextured = true; |
| 632 |
|
|
| 633 |
lock (Entities) |
lock (Entities) |
| 634 |
{ |
{ |
| 635 |
vObj.node = smgr.AddAnimatedMeshSceneNode(avmesh); |
vObj.node = smgr.AddAnimatedMeshSceneNode(avmesh); |
| 636 |
node = vObj.node; |
node = vObj.node; |
| 637 |
} |
} |
| 638 |
|
|
| 639 |
Mesh avmeshmesh = avmesh.GetMesh(0); |
//node.Scale = new Vector3D(0.035f, 0.035f, 0.035f); |
| 640 |
|
node.Scale = new Vector3D(15f, 15f, 15f); |
| 641 |
|
if (!isTextured) |
|
node.Scale = new Vector3D(0.035f, 0.035f, 0.035f); |
|
| 642 |
node.SetMaterialTexture(0, driver.GetTexture(avatarMaterial)); |
node.SetMaterialTexture(0, driver.GetTexture(avatarMaterial)); |
| 643 |
node.SetMaterialFlag(MaterialFlag.Lighting, true); |
node.SetMaterialFlag(MaterialFlag.Lighting, true); |
| 644 |
lock (interpolationTargets) |
lock (interpolationTargets) |