refactored EntityClass usage to only store being a miscmodel in miscmodel_is bool + set it on setting classname
* miscmodel filter: simplify and support miscmodels, defined by new way (xml .ent)
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
EGameType g_gameType;
|
||||
|
||||
inline scene::Node& entity_for_eclass( EntityClass* eclass ){
|
||||
if ( EntityClass_miscmodel_is( eclass ) ) {
|
||||
if ( eclass->miscmodel_is ) {
|
||||
return New_MiscModel( eclass );
|
||||
}
|
||||
else if ( classname_equal( eclass->name(), "light" )
|
||||
@@ -348,11 +348,18 @@ bool filter( const Entity& entity ) const {
|
||||
filter_entity_classname g_filter_entity_func_group( "func_group" );
|
||||
filter_entity_classgroup g_filter_entity_func_detail( "func_detail" );
|
||||
filter_entity_classname g_filter_entity_light( "light" );
|
||||
filter_entity_classname g_filter_entity_misc_model( "misc_model" );
|
||||
filter_entity_classname g_filter_entity_misc_gamemodel( "misc_gamemodel" );
|
||||
filter_entity_classgroup g_filter_entity_trigger( "trigger_" );
|
||||
filter_entity_classgroup g_filter_entity_path( "path_" );
|
||||
|
||||
class filter_entity_misc_model : public EntityFilter
|
||||
{
|
||||
public:
|
||||
bool filter( const Entity& entity ) const {
|
||||
return entity.getEntityClass().miscmodel_is;
|
||||
}
|
||||
};
|
||||
filter_entity_misc_model g_filter_entity_misc_model;
|
||||
|
||||
class filter_entity_doom3model : public EntityFilter
|
||||
{
|
||||
public:
|
||||
@@ -388,7 +395,6 @@ void Entity_InitFilters(){
|
||||
add_entity_filter( g_filter_entity_world, EXCLUDE_ENT, true );
|
||||
add_entity_filter( g_filter_entity_trigger, EXCLUDE_TRIGGERS );
|
||||
add_entity_filter( g_filter_entity_misc_model, EXCLUDE_MODELS );
|
||||
add_entity_filter( g_filter_entity_misc_gamemodel, EXCLUDE_MODELS );
|
||||
add_entity_filter( g_filter_entity_doom3model, EXCLUDE_MODELS );
|
||||
add_entity_filter( g_filter_entity_light, EXCLUDE_LIGHTS );
|
||||
add_entity_filter( g_filter_entity_path, EXCLUDE_PATHS );
|
||||
|
||||
Reference in New Issue
Block a user