- void dispatch(const char* command, float* vMin, float* vMax, bool bSingleBrush)
- {
- char *message = NULL;
- if(string_equal(command, "About"))
- {
- GlobalRadiant().m_pfnMessageBox(GTK_WIDGET(g_mainwnd),
- "UFO:AI Plugin (http://www.ufoai.net)\nBuild: " __DATE__ "\nRadiant version: " RADIANT_VERSION "\nPlugin version: " PLUGIN_VERSION "\n", "About",
- eMB_OK, eMB_ICONDEFAULT);
- }
- else if(string_equal(command, "Level 1"))
- {
- filter_level(CONTENTS_LEVEL1);
- }
- else if(string_equal(command, "Level 2"))
- {
- filter_level(CONTENTS_LEVEL2);
- }
- else if(string_equal(command, "Level 3"))
- {
- filter_level(CONTENTS_LEVEL3);
- }
- else if(string_equal(command, "Worldspawn (day)"))
- {
- assign_default_values_to_worldspawn(false, true, &message);
- }
- else if(string_equal(command, "Worldspawn (night)"))
- {
- assign_default_values_to_worldspawn(false, false, &message);
- }
- else if(string_equal(command, "Worldspawn reset (day)"))
- {
- assign_default_values_to_worldspawn(true, true, &message);
- }
- else if(string_equal(command, "Worldspawn reset (night)"))
- {
- assign_default_values_to_worldspawn(true, false, &message);
- }
- else if(string_equal(command, "Perform check"))
- {
- check_map_values(&message);
- }
- else if(string_equal(command, "Level 4"))
- {
- filter_level(CONTENTS_LEVEL4);
- }
- else if(string_equal(command, "Level 5"))
- {
- filter_level(CONTENTS_LEVEL5);
- }
- else if(string_equal(command, "Level 6"))
- {
- filter_level(CONTENTS_LEVEL6);
- }
- else if(string_equal(command, "Level 7"))
- {
- filter_level(CONTENTS_LEVEL7);
- }
- else if(string_equal(command, "Level 8"))
- {
- filter_level(CONTENTS_LEVEL8);
- }
- else if(string_equal(command, "StepOn"))
- {
- filter_stepon();
- }
- else if(string_equal(command, "ActorClip"))
- {
- filter_actorclip();
- }
-
- if (message != NULL)
- {
- GlobalRadiant().m_pfnMessageBox(GTK_WIDGET(g_mainwnd),
- message, "Note",
- eMB_OK, eMB_ICONDEFAULT);
- }
- SceneChangeNotify();
+ else if ( string_equal( command, "Worldspawn" ) ) {
+ assign_default_values_to_worldspawn( false, &message );
+ }
+ else if ( string_equal( command, "Worldspawn reset" ) ) {
+ assign_default_values_to_worldspawn( true, &message );
+ }
+ else if ( string_equal( command, "Perform check" ) ) {
+ check_map_values( &message );
+ }
+ else if ( string_equal( command, "Level 4" ) ) {
+ filter_level( CONTENTS_LEVEL4 );
+ }
+ else if ( string_equal( command, "Level 5" ) ) {
+ filter_level( CONTENTS_LEVEL5 );
+ }
+ else if ( string_equal( command, "Level 6" ) ) {
+ filter_level( CONTENTS_LEVEL6 );
+ }
+ else if ( string_equal( command, "Level 7" ) ) {
+ filter_level( CONTENTS_LEVEL7 );
+ }
+ else if ( string_equal( command, "Level 8" ) ) {
+ filter_level( CONTENTS_LEVEL8 );
+ }
+ else if ( string_equal( command, "StepOn" ) ) {
+ filter_stepon();
+ }
+ else if ( string_equal( command, "ActorClip" ) ) {
+ filter_actorclip();