]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/control.c
Indented with src/scripts/indent-emp.
[empserver] / src / lib / subs / control.c
index 5edb9ba2927921f2e22babbd44b3666ec7eb8cb1..9835fbbd6f107d5118f8acba108cb999a7ea5109 100644 (file)
 int
 military_control(struct sctstr *sp)
 {
-       int     tot_mil=0;
-       struct  nstr_item ni;
-       struct  lndstr land;
+    int tot_mil = 0;
+    struct nstr_item ni;
+    struct lndstr land;
 
-       if (sp->sct_oldown != sp->sct_own){
-               snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
-               while (nxtitem(&ni, (s_char *)&land)){
-                       if (land.lnd_own == sp->sct_own)
-                               tot_mil += total_mil(&land);
-               }
-               if ((getvar(V_MILIT, (s_char *)sp, EF_SECTOR)+tot_mil) * 10
-                       < getvar(V_CIVIL, (s_char *)sp, EF_SECTOR))
-                       return 0;
+    if (sp->sct_oldown != sp->sct_own) {
+       snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
+       while (nxtitem(&ni, (s_char *)&land)) {
+           if (land.lnd_own == sp->sct_own)
+               tot_mil += total_mil(&land);
        }
+       if ((getvar(V_MILIT, (s_char *)sp, EF_SECTOR) + tot_mil) * 10
+           < getvar(V_CIVIL, (s_char *)sp, EF_SECTOR))
+           return 0;
+    }
 
-       return 1;
+    return 1;
 }