#include "qe3.h"
#include "commands.h"
+#include "brushmanip.h"
+#include "patchmanip.h"
+
#include "uilib/uilib.h"
struct entity_globals_t
bool isModel = ( string_compare_nocase_n( name, "misc_", 5 ) == 0 && string_equal_nocase( name + string_length( name ) - 5, "model" ) ) // misc_*model (also misc_model)
|| string_equal_nocase( name, "model_static" )
- || ( GlobalSelectionSystem().countSelected() == 0 && string_equal_nocase( name, "func_static" ) );
+ || ( GlobalSelectionSystem().countSelected() == 0 && string_equal_nocase( name, "func_static" ) && g_pGameDescription->mGameType == "doom3" );
bool brushesSelected = Scene_countSelectedBrushes( GlobalSceneGraph() ) != 0;
Node_getEntity( node )->setKeyValue( "model", model );
}
}
+
+ if ( string_compare_nocase_n( name, "trigger_", 8 ) == 0 && brushesSelected ){
+ const char* shader = g_pGameDescription->getKeyValue( "shader_trigger" );
+ if ( shader && *shader ){
+ Scene_PatchSetShader_Selected( GlobalSceneGraph(), shader );
+ Scene_BrushSetShader_Selected( GlobalSceneGraph(), shader );
+ }
+ else{
+ Scene_PatchSetShader_Selected( GlobalSceneGraph(), "textures/common/trigger" );
+ Scene_BrushSetShader_Selected( GlobalSceneGraph(), "textures/common/trigger" );
+ }
+ }
}
#if 0
create_menu_item_with_mnemonic( menu, "_Regroup", "GroupSelection" );
create_menu_item_with_mnemonic( menu, "_Ungroup", "UngroupSelection" );
create_menu_item_with_mnemonic( menu, "_Connect", "ConnectSelection" );
- create_menu_item_with_mnemonic( menu, "_KillConnect", "KillConnectSelection" );
+ if ( g_pGameDescription->mGameType == "nexuiz" ) {
+ create_menu_item_with_mnemonic( menu, "_KillConnect", "KillConnectSelection" );
+ }
create_menu_item_with_mnemonic( menu, "_Select Color...", "EntityColor" );
create_menu_item_with_mnemonic( menu, "_Normalize Color...", "NormalizeColor" );
}