]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/rout.c
Update copyright notice
[empserver] / src / lib / commands / rout.c
index 7c346d41f2360dfa4dff98d55fa16fb18949556d..7a32dfcbd59c29137891362c04db2640a2ac7300 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-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -61,7 +61,7 @@ rout(void)
     static char **map = NULL;
     int i;
 
-    if ((ip = whatitem(player->argp[1], "What item? ")) == 0)
+    if (!(ip = whatitem(player->argp[1], "What item? ")))
        return RET_SYN;
     i_del = ip->i_uid;;
     if (!snxtsct(&ns, player->argp[2]))
@@ -96,8 +96,8 @@ rout(void)
        if (!player->owner)
            continue;
        p = &map[ns.dy][ns.dx * 2];
-       if ((dir = sect.sct_del[i_del] & 0x7) &&
-           nstr_exec(cond, ncond, &sect))
+       dir = sect.sct_del[i_del] & 0x7;
+       if (dir && nstr_exec(cond, ncond, &sect))
            memcpy(p, routech[dir], 3);
        p[1] = dchr[sect.sct_type].d_mnem;
     }