--- yadex-1.7.0/src/editloop.cc	2003-07-05 04:12:32.000000000 -0700
+++ yadex-1.7.0/src/editloop.cc	2004-01-05 05:25:54.000000000 -0700
@@ -342,6 +342,7 @@
    "~Next object",       'n',   0,
    "~Prev object",       'p',   0,
    "~Jump to object...", 'j',   0,
+   "~Find by type",	 'f',	0,
    NULL);
 
 e.mb_menu[MBM_MISC_L] = new Menu ("Misc. operations",
@@ -1834,6 +1835,56 @@
 	 RedrawMap = 1;
 	 }
 
+      // [f]: find object by type
+      else if (is.key == 'f' && (! e.global || e.highlighted ())) 
+	 {
+	 Objid find_obj;
+	 int otype;
+	 obj_no_t omax,onum;
+	 find_obj.type = e.highlighted () ? e.highlighted.type : e.obj_type;
+	 onum = find_obj.num  = e.highlighted () ? e.highlighted.num  : 0;
+	 omax = GetMaxObjectNum(find_obj.type);
+         switch (find_obj.type)
+            {
+	    case OBJ_SECTORS:
+               if ( ! InputSectorType( 84, 21, &otype))
+		  {
+	          for (onum = e.highlighted () ? onum + 1 : onum; onum <= omax; onum++)
+	             if (Sectors[onum].special == (wad_stype_t) otype)
+			{
+		        find_obj.num = onum;
+	                GoToObject(find_obj);
+		        break;
+		        }
+		  }
+	    break;
+	    case OBJ_THINGS:
+	       if ( ! InputThingType( 42, 21, &otype))
+	 	  {
+                  for (onum = e.highlighted () ? onum + 1 : onum; onum <= omax; onum++)
+	             if (Things[onum].type == (wad_ttype_t) otype)
+                        {
+		        find_obj.num = onum;
+	                GoToObject(find_obj);
+		        break;
+		        }
+		  }
+	    break;
+	    case OBJ_LINEDEFS:
+	       if ( ! InputLinedefType( 0, 21, &otype))
+		  {
+	          for (onum = e.highlighted () ? onum + 1 : onum; onum <= omax; onum++)
+		     if (LineDefs[onum].type == (wad_ldtype_t) otype)
+			{
+		        find_obj.num = onum;
+	                GoToObject(find_obj);
+			break;
+		        }
+		  }
+	    break;
+	    }
+         RedrawMap = 1;
+         }
 #if 0
       // [c]: clear selection and redraw the map
       else if (is.key == 'c')
--- yadex-1.7.0/src/editloop.h	2000-01-10 06:40:12.000000000 -0700
+++ yadex-1.7.0/src/editloop.h	2004-01-05 05:09:25.000000000 -0700
@@ -6,6 +6,9 @@
 
 void EditorLoop (const char *); /* SWAP! */
 const char *SelectLevel (int levelno);
+extern int InputSectorType(int x0, int y0, int *number);
+extern int InputLinedefType(int x0, int y0, int *number);
+extern int InputThingType(int x0, int y0, int *number);
 
 
 
--- yadex-1.7.0/src/l_prop.cc	2003-03-28 05:37:32.000000000 -0700
+++ yadex-1.7.0/src/l_prop.cc	2004-01-05 05:09:25.000000000 -0700
@@ -105,7 +105,7 @@
  *	Prototypes of private functions
  */
 static char *GetTaggedLineDefFlag (int linedefnum, int flagndx);
-static int InputLinedefType (int x0, int y0, int *number);
+int InputLinedefType (int x0, int y0, int *number);
 static const char *PrintLdtgroup (void *ptr);
 
 
@@ -475,7 +475,7 @@
  *	Let the user select a linedef type number and return it.
  *	Returns 0 if OK, <>0 if cancelled
  */
-static int InputLinedefType (int x0, int y0, int *number)
+int InputLinedefType (int x0, int y0, int *number)
 {
   int         r;
   int         ldtgno = 0;
--- yadex-1.7.0/src/s_prop.cc	2003-03-28 05:37:32.000000000 -0700
+++ yadex-1.7.0/src/s_prop.cc	2004-01-05 05:09:25.000000000 -0700
@@ -259,4 +259,37 @@
   }
 }
 
-
+/*
+ * 	InputSectorType
+ * 	Let the user select a sector type number and return it
+ * 	Returns 0 if OK, <>0 if cancelled
+ */
+int InputSectorType (int x0, int y0, int *number)
+{
+  int	val;
+  val = 0;
+  *number = 0;
+  Menu_data_st menudata (stdef);
+	if (DisplayMenuList (x0 , y0, "Select type", menudata, &val)
+	  < 0)
+	  return 1;
+  // KLUDGE last element of stdef means "enter value"
+  if (val == al_lcount (stdef) - 1)
+  	{
+	  val = InputIntegerValue (x0 + 84,
+	    y0 + BOX_BORDER + (3 + val) * FONTH,
+	    -32768, 32767, 0);
+	  if (val == IIV_CANCEL)  // [Esc]
+	    return 1;
+	}
+	else
+	{
+	  if (al_lseek (stdef, val, SEEK_SET))
+	    fatal_error ("%s SP1 (%s)\n",
+	      msg_unexpected, al_astrerror (al_aerrno));
+	  val = CUR_STDEF->number;
+	}
+  if (val < 0) return 1;  //unsuccessful
+  *number = val;
+  return 0;               //successful
+}
--- yadex-1.7.0/src/t_prop.cc	2003-03-28 05:37:32.000000000 -0700
+++ yadex-1.7.0/src/t_prop.cc	2004-01-05 05:09:25.000000000 -0700
@@ -39,13 +39,12 @@
 #include "selectn.h"
 #include "things.h"
 
-
 /*
  *	Private functions prototypes
  */
-static int InputThingType (int x0, int y0, int *number);
 static const char *PrintThinggroup (void *ptr);
 static const char *PrintThingdef (void *ptr);
+int InputThingType (int x0, int y0, int *number);
 
 
 /*
@@ -250,7 +249,7 @@
  *	Let the user select a thing number and return it.
  *	Returns 0 if OK, <>0 if cancelled
  */
-static int InputThingType (int x0, int y0, int *number)
+int InputThingType (int x0, int y0, int *number)
 {
 int         r;
 int         tgno = 0;
