Added a new material, "player_trans.xml" which will give a model player color. So now if you want a player to be colored, just add this material!

This was SVN commit r1830.
This commit is contained in:
NoMonkey
2005-01-27 02:52:26 +00:00
parent 969ed22f97
commit d7b3d6b0c7
14 changed files with 100 additions and 29 deletions
+11 -2
View File
@@ -32,7 +32,8 @@ CMaterial::CMaterial()
m_Specular(IdentitySpecular),
m_Emissive(IdentityEmissive),
m_SpecularPower(0.0f),
m_Alpha(false)
m_Alpha(false),
m_bPlayer(false)
{
ComputeHash();
}
@@ -55,6 +56,7 @@ void CMaterial::operator =(const CMaterial &material)
m_SpecularPower = material.m_SpecularPower;
m_Alpha = material.m_Alpha;
m_bPlayer = material.m_bPlayer;
ComputeHash();
}
@@ -67,7 +69,8 @@ bool CMaterial::operator ==(const CMaterial &material)
m_Specular == material.m_Specular &&
m_Emissive == material.m_Emissive &&
m_SpecularPower == material.m_SpecularPower &&
m_Alpha == material.m_Alpha
m_Alpha == material.m_Alpha &&
m_bPlayer == material.m_bPlayer
);
}
@@ -160,6 +163,12 @@ void CMaterial::SetUsesAlpha(bool flag)
ComputeHash();
}
void CMaterial::SetIsPlayer(bool flag)
{
m_bPlayer = flag;
ComputeHash();
}
void CMaterial::ComputeHash()
{
m_Hash =