diff --git a/polymer/eduke32/build/include/editor.h b/polymer/eduke32/build/include/editor.h index ab9b1e50d..db6354df5 100644 --- a/polymer/eduke32/build/include/editor.h +++ b/polymer/eduke32/build/include/editor.h @@ -328,6 +328,7 @@ void update_highlight(void); void update_highlightsector(void); void reset_highlightsector(void); void reset_highlight(void); +void handlesecthighlight1(int32_t i, int32_t sub, int32_t nograycheck); void ovh_whiteoutgrab(int32_t restoreredwalls); int32_t inside_editor_curpos(int16_t sectnum); diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index bc41249e8..647374362 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -2831,7 +2831,7 @@ void SetFirstWall(int32_t sectnum, int32_t wallnum, int32_t alsoynw) asksave = 1; } -static void handlesecthighlight1(int32_t i, int32_t sub, int32_t nograycheck) +void handlesecthighlight1(int32_t i, int32_t sub, int32_t nograycheck) { int32_t j; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 2bd3d3f32..6ad231f98 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -4430,6 +4430,28 @@ static void Keys3d(void) VM_OnEvent(EVENT_PREKEYS3D, -1); + if (keystatus[KEYSC_RALT] && keystatus[KEYSC_RCTRL] && AIMING_AT_CEILING_OR_FLOOR && searchsector >= 0) + { + keystatus[KEYSC_RALT] = 0; + + if (highlightcnt >= 0) + { + message("WARNING: Cannot select sectors while sprites/walls selected"); + } + else + { + const int32_t sub = keystatus[KEYSC_SEMI]; + const int32_t add = keystatus[KEYSC_QUOTE]; + + if (!add && !sub) + reset_highlightsector(); + + handlesecthighlight1(searchsector, sub, 1); + + message("%s sector %d", sub ? "De-selected" : "Selected", searchsector); + } + } + if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(V)) // ' V { if (AIMING_AT_CEILING_OR_FLOOR)