]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/tran.c
Sectors need space for items, deliveries and distribution thresholds.
[empserver] / src / lib / commands / tran.c
index d4775af974a6c147e977403ee455b36fa1451e94..a1ba14fb8898e121fdf8ba82a08e5b6fc207895b 100644 (file)
@@ -166,8 +166,7 @@ tran_nuke(void)
            if (land.lnd_own == player->cnum)
                tot_mil += total_mil(&land);
        }
-       if ((getvar(V_MILIT, (s_char *)&sect, EF_SECTOR) + tot_mil) * 10
-           < getvar(V_CIVIL, (s_char *)&sect, EF_SECTOR)) {
+       if ((sect.sct_item[I_MILIT] + tot_mil) * 10 < sect.sct_item[I_CIVIL]) {
            pr("Military control required to move goods.\n");
            return RET_FAIL;
        }
@@ -282,8 +281,7 @@ tran_plane(void)
        snxtitem_xy(&ni, EF_LAND, sect.sct_x, sect.sct_y);
        while (nxtitem(&ni, (s_char *)&land))
            tot_mil += total_mil(&land);
-       if ((getvar(V_MILIT, (s_char *)&sect, EF_SECTOR) + tot_mil) * 10
-           < getvar(V_CIVIL, (s_char *)&sect, EF_SECTOR)) {
+       if ((sect.sct_item[I_MILIT] + tot_mil) * 10 < sect.sct_item[I_CIVIL]) {
            pr("Military control required to move goods.\n");
            return RET_FAIL;
        }