Entity list

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Fabio451
Posts: 17
Joined: Sun Nov 08, 2015 4:50 pm

Entity list

Post by Fabio451 »

Hi guys.
This code should show all entities of a bsp file:

Code: Select all

 
  quake3::tQ3EntityList &entityList = q3levelmesh->getEntityList ();
 
  for (u32 e=0; e != entityList.size (); ++e) {
    for (u32 g=0; g != entityList[e].getGroupSize (); ++g) {
      const quake3::SVarGroup *group = entityList[e].getGroup ( g );
 
      for ( u32 index = 0; index < group->Variable.size (); ++index ) {
        const quake3::SVariable &v = group->Variable[index];
 
        if (v.name.equals_ignore_case("classname"))
          printf ("%s = %s\n", v.name.c_str(), v.content.c_str());
      }
    }
  }
 
Why entities of type misc_model are not listed?
If I change classname from misc_model to misc_object (or anything else) the entity is in the list.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Entity list

Post by hendu »

From radiant docs:
Generic placeholder for inserting MD3 models in game. Requires compilation of map geometry to be add
ed to level. If the map is compiled with Q3Map2, then ASE, 3DS, OBJ and other model formats are supp
orted.
That is, misc_models are compiled as part of the BSP geometry, not as entities. Different games use different entities for "tell the engine to load this model here dynamically", Xonotic used misc_model_static IIRC, I used misc_model_engine, etc.

https://en.wikibooks.org/wiki/GtkRadiant/Using_Models
Fabio451
Posts: 17
Joined: Sun Nov 08, 2015 4:50 pm

Re: Entity list

Post by Fabio451 »

Clear. Thanks, Hendu.
Post Reply