Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixup2
Browse files Browse the repository at this point in the history
cx384 committed Jan 16, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 39c272c commit b0b9c7c
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/client/content_cao.cpp
Original file line number Diff line number Diff line change
@@ -743,7 +743,7 @@ void GenericCAO::addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr)
errorstream<<"GenericCAO::addToScene(): Could not load mesh "<<m_prop.mesh<<std::endl;
break;
}
case OBJECTVISUAL_WIELDITEMITEM:
case OBJECTVISUAL_WIELDITEM:
case OBJECTVISUAL_ITEM: {
grabMatrixNode();
ItemStack item;
@@ -762,7 +762,7 @@ void GenericCAO::addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr)
}
m_wield_meshnode = new WieldMeshSceneNode(m_smgr, -1);
m_wield_meshnode->setItem(item, m_client,
(m_prop.visual == OBJECTVISUAL_WIELDITEMITEM));
(m_prop.visual == OBJECTVISUAL_WIELDITEM));

m_wield_meshnode->setScale(m_prop.visual_size / 2.0f);
break;
@@ -883,7 +883,7 @@ void GenericCAO::updateLight(u32 day_night_ratio)

void GenericCAO::setNodeLight(const video::SColor &light_color)
{
if (m_prop.visual == OBJECTVISUAL_WIELDITEMITEM || m_prop.visual == OBJECTVISUAL_ITEM) {
if (m_prop.visual == OBJECTVISUAL_WIELDITEM || m_prop.visual == OBJECTVISUAL_ITEM) {
if (m_wield_meshnode)
m_wield_meshnode->setNodeLightColor(light_color);
return;
@@ -1573,7 +1573,7 @@ bool GenericCAO::visualExpiryRequired(const ObjectProperties &new_) const
*/

bool uses_legacy_texture = new_.wield_item.empty() &&
(new_.visual == OBJECTVISUAL_WIELDITEMITEM || new_.visual == OBJECTVISUAL_ITEM);
(new_.visual == OBJECTVISUAL_WIELDITEM || new_.visual == OBJECTVISUAL_ITEM);
// Ordered to compare primitive types before std::vectors
return old.backface_culling != new_.backface_culling ||
old.is_visible != new_.is_visible ||
2 changes: 1 addition & 1 deletion src/object_properties.cpp
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ const struct EnumString es_ObjectVisual[] =
{OBJECTVISUAL_CUBE, "cube"},
{OBJECTVISUAL_MESH, "mesh"},
{OBJECTVISUAL_ITEM, "item"},
{OBJECTVISUAL_WIELDITEMITEM, "wielditem"},
{OBJECTVISUAL_WIELDITEM, "wielditem"},
{0, nullptr},
};

2 changes: 1 addition & 1 deletion src/object_properties.h
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ enum ObjectVisual : u8 {
OBJECTVISUAL_CUBE,
OBJECTVISUAL_MESH,
OBJECTVISUAL_ITEM,
OBJECTVISUAL_WIELDITEMITEM,
OBJECTVISUAL_WIELDITEM,
};

extern const EnumString es_ObjectVisual[];

0 comments on commit b0b9c7c

Please sign in to comment.