mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Document that object properties colors
field is unused (#15685)
This commit is contained in:
parent
f17498b049
commit
a8c4c55d58
5 changed files with 4 additions and 6 deletions
|
@ -9236,7 +9236,7 @@ Player properties need to be saved manually.
|
||||||
-- Deprecated usage of "wielditem" expects 'textures = {itemname}' (see 'visual' above).
|
-- Deprecated usage of "wielditem" expects 'textures = {itemname}' (see 'visual' above).
|
||||||
|
|
||||||
colors = {},
|
colors = {},
|
||||||
-- Number of required colors depends on visual
|
-- Currently unused.
|
||||||
|
|
||||||
use_texture_alpha = false,
|
use_texture_alpha = false,
|
||||||
-- Use texture's alpha channel.
|
-- Use texture's alpha channel.
|
||||||
|
|
|
@ -1407,8 +1407,8 @@ void GenericCAO::updateTextures(std::string mod)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Set mesh color (only if lighting is disabled)
|
// Set mesh color (only if lighting is disabled)
|
||||||
if (!m_prop.colors.empty() && m_prop.glow < 0)
|
if (m_prop.glow < 0)
|
||||||
setMeshColor(mesh, m_prop.colors[0]);
|
setMeshColor(mesh, {255, 255, 255, 255});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Prevent showing the player after changing texture
|
// Prevent showing the player after changing texture
|
||||||
|
|
|
@ -16,7 +16,6 @@ static const video::SColor NULL_BGCOLOR{0, 1, 1, 1};
|
||||||
ObjectProperties::ObjectProperties()
|
ObjectProperties::ObjectProperties()
|
||||||
{
|
{
|
||||||
textures.emplace_back("no_texture.png");
|
textures.emplace_back("no_texture.png");
|
||||||
colors.emplace_back(255,255,255,255);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ObjectProperties::dump() const
|
std::string ObjectProperties::dump() const
|
||||||
|
|
|
@ -16,7 +16,7 @@ struct ObjectProperties
|
||||||
/* member variables ordered roughly by size */
|
/* member variables ordered roughly by size */
|
||||||
|
|
||||||
std::vector<std::string> textures;
|
std::vector<std::string> textures;
|
||||||
std::vector<video::SColor> colors;
|
std::vector<video::SColor> colors; // Currently unused
|
||||||
// Values are BS=1
|
// Values are BS=1
|
||||||
aabb3f collisionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f);
|
aabb3f collisionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f);
|
||||||
// Values are BS=1
|
// Values are BS=1
|
||||||
|
|
|
@ -32,7 +32,6 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, session_t p
|
||||||
m_prop.textures.emplace_back("player.png");
|
m_prop.textures.emplace_back("player.png");
|
||||||
m_prop.textures.emplace_back("player_back.png");
|
m_prop.textures.emplace_back("player_back.png");
|
||||||
m_prop.colors.clear();
|
m_prop.colors.clear();
|
||||||
m_prop.colors.emplace_back(255, 255, 255, 255);
|
|
||||||
m_prop.spritediv = v2s16(1,1);
|
m_prop.spritediv = v2s16(1,1);
|
||||||
m_prop.eye_height = 1.625f;
|
m_prop.eye_height = 1.625f;
|
||||||
// End of default appearance
|
// End of default appearance
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue