]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/shpsub.c
COPYING duplicates information from README. Remove. Move GPL from
[empserver] / src / lib / subs / shpsub.c
index 7526ebb9624024c0428b7328525e047886aff5a5..c1b021142c400a8d3557667a9994f2b77f35ece8 100644 (file)
@@ -19,9 +19,9 @@
  *
  *  ---
  *
- *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- *  related information and legal notices. It is expected that any future
- *  projects/authors will amend these files as needed.
+ *  See files README, COPYING and CREDITS in the root of the source
+ *  tree for related information and legal notices.  It is expected
+ *  that future projects/authors will amend these files as needed.
  *
  *  ---
  *
@@ -55,7 +55,6 @@
 #include "server.h"
 #include "prototypes.h"
 
-static int shp_check_nav(struct sctstr *);
 static int shp_check_one_mines(struct mlist *);
 static int shp_hit_mine(struct shpstr *, struct mchrstr *);
 static void shp_mess(s_char *, struct mlist *);
@@ -163,7 +162,7 @@ shp_nav(struct emp_qelem *list, double *minmobp, double *maxmobp,
            continue;
        case CN_LANDLOCKED:
            shp_mess("is landlocked", mlp);
-           break;
+           continue;
        case CN_NAVIGABLE:
            break;
        case CN_ERROR:
@@ -368,10 +367,10 @@ shp_mess(s_char *str, struct mlist *mlp)
     free(mlp);
 }
 
-static int
+int
 shp_check_nav(struct sctstr *sect)
 {
-    switch (dchr[sect->sct_type].d_flg & 03) {
+    switch (dchr[sect->sct_type].d_nav) {
     case NAVOK:
        break;
 
@@ -389,6 +388,17 @@ shp_check_nav(struct sctstr *sect)
     return CN_NAVIGABLE;
 }
 
+int
+sect_has_dock(struct sctstr *sect)
+{
+    switch (dchr[sect->sct_type].d_nav) {
+    case NAV_02:
+       return 1;
+    default:
+       return 0;
+    }
+}
+
 static int
 shp_count(struct emp_qelem *list, int wantflags, int nowantflags, int x,
          int y)