]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/sect.c
Update copyright notice.
[empserver] / src / lib / subs / sect.c
index 23eaf73691dcec3d227b8064850e40ebb33d02a3..32a3a7d9152fe98150da8ab812b99fcdc885c17c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -38,7 +38,6 @@
 #include "sect.h"
 #include "xy.h"
 #include "nat.h"
-#include "deity.h"
 #include "file.h"
 #include "land.h"
 #include "nsc.h"
@@ -46,6 +45,7 @@
 #include "prototypes.h"
 #include "optlist.h"
 
+static int checksect(struct sctstr *);
 static void give_back_cap(struct sctstr *sp);
 
 /*ARGSUSED*/
@@ -75,7 +75,7 @@ sct_prewrite(int id, s_char *ptr)
     return 1;
 }
 
-int
+static int
 checksect(struct sctstr *sp)
 {
     int mil, civs, loyalcivs;
@@ -84,14 +84,14 @@ checksect(struct sctstr *sp)
     if (sp->sct_mobil > 127)
        sp->sct_mobil = 0;
 
-    mil = getvar(V_MILIT, (s_char *)sp, EF_SECTOR);
-    civs = getvar(V_CIVIL, (s_char *)sp, EF_SECTOR);
+    mil = sp->sct_item[I_MILIT];
+    civs = sp->sct_item[I_CIVIL];
     if (sp->sct_own == sp->sct_oldown)
        loyalcivs = civs;
     else
        loyalcivs = 0;
 
-    if (sp->sct_effic < 20) {
+    if (sp->sct_effic < SCT_MINEFF) {
        if (sp->sct_type == SCT_BSPAN)
            knockdown(sp, 0);
        else if (sp->sct_type == SCT_BTOWER) {