#ifndef SERVER
infostream << "CNodeDefManager::updateTextures(): Updating "
"textures in node definitions" << std::endl;
-
+
ITextureSource *tsrc = gamedef->tsrc();
IShaderSource *shdsrc = gamedef->getShaderSource();
scene::ISceneManager* smgr = gamedef->getSceneManager();
recalculateBoundingBox(f->mesh_ptr[0]);
meshmanip->recalculateNormals(f->mesh_ptr[0], true, false);
}
- } else if ((f->drawtype == NDT_NODEBOX) &&
+ } else if ((f->drawtype == NDT_NODEBOX) &&
((f->node_box.type == NODEBOX_REGULAR) ||
(f->node_box.type == NODEBOX_FIXED)) &&
(!f->node_box.fixed.empty())) {
}
rotateMeshBy6dFacedir(f->mesh_ptr[0], wm_to_6d[0]);
recalculateBoundingBox(f->mesh_ptr[0]);
- meshmanip->recalculateNormals(f->mesh_ptr[0], true, false);
+ meshmanip->recalculateNormals(f->mesh_ptr[0], true, false);
}
}
#endif
writeU8(os, drowning);
writeU8(os, leveled);
writeU8(os, liquid_range);
- } else
+ } else
throw SerializationError("ContentFeatures::serialize(): "
"Unsupported version requested");
}
{
bool found = false;
- std::list<NodeResolveInfo *>::iterator it = m_pending_contents.begin();
- while (it != m_pending_contents.end()) {
+ for (std::list<NodeResolveInfo *>::iterator
+ it = m_pending_contents.begin();
+ it != m_pending_contents.end();
+ ++it) {
NodeResolveInfo *nfi = *it;
if (nfi->output == content) {
it = m_pending_contents.erase(it);
{
int num_canceled = 0;
- std::list<std::pair<std::string, std::vector<content_t> *> >::iterator it;
- it = m_pending_content_vecs.begin();
- while (it != m_pending_content_vecs.end()) {
+ for (ContentVectorResolveList::iterator
+ it = m_pending_content_vecs.begin();
+ it != m_pending_content_vecs.end();
+ ++it) {
if (it->second == content_vec) {
it = m_pending_content_vecs.erase(it);
num_canceled++;
//// Resolve pending single node name -> content ID mappings
while (!m_pending_contents.empty()) {
- NodeResolveInfo *nri = m_pending_contents.front();
+ NodeResolveInfo *nri = m_pending_contents.front();
m_pending_contents.pop_front();
bool success = true;
std::string &name = item.first;
std::vector<content_t> *output = item.second;
-
+
std::set<content_t> idset;
std::set<content_t>::iterator it;
class IGameDef;
typedef std::list<std::pair<content_t, int> > GroupItems;
+typedef std::list<std::pair<std::string, std::vector<content_t> *> >
+ ContentVectorResolveList;
enum ContentParamType
{
*/
#ifndef SERVER
// 0 1 2 3 4 5
- // up down right left back front
+ // up down right left back front
TileSpec tiles[6];
// Special tiles
// - Currently used for flowing liquids
std::string mesh;
#ifndef SERVER
scene::IMesh *mesh_ptr[24];
-#endif
+#endif
float visual_scale; // Misc. scale parameter
TileDef tiledef[6];
TileDef tiledef_special[CF_SPECIAL_COUNT]; // eg. flowing liquid
/*
Methods
*/
-
+
ContentFeatures();
~ContentFeatures();
void reset();
INodeDefManager *m_ndef;
bool m_is_node_registration_complete;
std::list<NodeResolveInfo *> m_pending_contents;
- std::list<std::pair<std::string, std::vector<content_t> *> > m_pending_content_vecs;
+ ContentVectorResolveList m_pending_content_vecs;
};
class INodeDefManager
virtual void getIds(const std::string &name, std::set<content_t> &result)
const=0;
virtual const ContentFeatures& get(const std::string &name) const=0;
-
+
virtual void serialize(std::ostream &os, u16 protocol_version)=0;
virtual NodeResolver *getResolver()=0;