]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/expl.c
Update copyright notice
[empserver] / src / lib / commands / expl.c
index 4498833900411cc45a8aa2ed6a6136f79f816d2b..ce5d5beaf26763d96a98afe210b2b90eb91f3723 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@
  *  ---
  *
  *  expl.c: Take over unoccupied sectors
- * 
+ *
  *  Known contributors to this file:
  *     Jeff Wallace, 1989
  */
@@ -110,6 +110,8 @@ explore(void)
     sprintf(prompt, "Number of %s to explore with? (max %d) ",
            ip->i_name, amt_src);
     amount = onearg(player->argp[3], prompt);
+    if (amount <= 0)
+       return RET_SYN;
     if (!check_sect_ok(&sect))
        return RET_FAIL;
     if (amount > amt_src) {
@@ -125,8 +127,6 @@ explore(void)
     if (!check_sect_ok(&sect))
        return RET_FAIL;
 
-    if (amount <= 0)
-       return RET_SYN;
     weight = (double)amount * ip->i_lbs;
     /* remove commodities from source sector */
     getsect(x, y, &start);
@@ -196,7 +196,7 @@ explore(void)
        putsect(&sect);
        return RET_FAIL;
     }
-    if (chksect.sct_type == '.') {
+    if (chksect.sct_type == SCT_WATER) {
        pr("Bridge disappeared!\n");
        getsect(start.sct_x, start.sct_y, &start);
        start.sct_flags &= ~MOVE_IN_PROGRESS;