mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user