Update comment about items' fog, remove some lighting flags that just hide
wrong export options (resave with normals to fix) and make the items look 2d. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7222 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
7e34b5d970
commit
76ee2036d8
@ -99,7 +99,7 @@ void ItemManager::loadDefaultItems()
|
||||
// in item.hpp. Note that bubblegum strictly isn't an item,
|
||||
// it is implemented as one, and so loaded here, too.
|
||||
static const std::string item_names[] = {"bonus-box", "banana",
|
||||
"nitro-big", "nitro-small",
|
||||
"nitro-big", "nitro-small",
|
||||
"bubblegum" };
|
||||
const std::string file_name = file_manager->getDataFile("items.xml");
|
||||
const XMLNode *root = file_manager->createXMLTree(file_name);
|
||||
@ -116,12 +116,13 @@ void ItemManager::loadDefaultItems()
|
||||
item_names[i].c_str());
|
||||
exit(-1);
|
||||
}
|
||||
// If lighting would be enabled certain items (esp. bananas)
|
||||
// don't look smooth, so for now generally disable lighting
|
||||
// FIXME : re-export models with normals instead
|
||||
mesh->setMaterialFlag(video::EMF_LIGHTING, false);
|
||||
// If items show the polygons instead of being smooth re-export with
|
||||
// normals (that was bananas' problem) but do not disable this flag
|
||||
//mesh->setMaterialFlag(video::EMF_LIGHTING, false);
|
||||
// FIXME this should check if current track uses fog or not
|
||||
// otherwise items look wrong when far away and track has no fog
|
||||
mesh->setMaterialFlag(video::EMF_FOG_ENABLE, true);
|
||||
std::string shortName =
|
||||
std::string shortName =
|
||||
StringUtils::getBasename(StringUtils::removeExtension(model_filename));
|
||||
m_all_meshes[shortName] = mesh;
|
||||
m_item_mesh[i] = mesh;
|
||||
|
@ -90,7 +90,9 @@ TrackObject::TrackObject(const XMLNode &xml_node)
|
||||
m_node->setPosition(m_init_xyz);
|
||||
m_node->setRotation(m_init_hpr);
|
||||
m_node->setScale(m_init_scale);
|
||||
m_node->setMaterialFlag(video::EMF_LIGHTING, false);
|
||||
// FIXME (to-be-removed) If something looks polygonal
|
||||
// re-export with normals instead of setting false here
|
||||
//m_node->setMaterialFlag(video::EMF_LIGHTING, false);
|
||||
}
|
||||
reset();
|
||||
} // TrackObject
|
||||
|
Loading…
Reference in New Issue
Block a user