]> git.pond.sub.org Git - empserver/commitdiff
(checksect, give_back_cap, guerrilla): No longer change capital to
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 31 Jul 2005 13:55:50 +0000 (13:55 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 31 Jul 2005 13:55:50 +0000 (13:55 +0000)
agribusiness.  That was done when the occupier abandons the old-owners
capital or it revolts, to prevent players from sacking the same
capital many timers.  The server has a much better way to prevent that
since 4.2.7, so this weird hack is no longer useful.  Thanks to Pat
Loney for pointing this out.

src/lib/subs/sect.c
src/lib/update/revolt.c

index 94c6a245f02b2f38c331e05a742ade5f2da326df..b2f82f2957e8d6bff5d0532f2d6828ffd591f85a 100644 (file)
@@ -45,7 +45,6 @@
 #include "optlist.h"
 
 static int checksect(struct sctstr *);
-static void give_back_cap(struct sctstr *sp);
 
 /*ARGSUSED*/
 int
@@ -128,15 +127,8 @@ checksect(struct sctstr *sp)
                makelost(EF_SECTOR, sp->sct_own, 0, sp->sct_x, sp->sct_y);
                sp->sct_own = 0;
                sp->sct_oldown = 0;
-           } else {
-               /* if oldown gets his cap back make agri */
-               if (sp->sct_oldown &&
-                   player->cnum == sp->sct_own &&
-                   sp->sct_type == SCT_CAPIT &&
-                   sp->sct_newtype == SCT_CAPIT)
-                   give_back_cap(sp);
+           } else
                takeover(sp, sp->sct_oldown);
-           }
            sp->sct_mobil = 0;
        }
     }
@@ -157,17 +149,6 @@ issector(s_char *arg)
     return 0;
 }
 
-static void
-give_back_cap(struct sctstr *sp)
-{
-    struct natstr *natp = getnatp(sp->sct_oldown);
-
-    if (xrel(natp, natp->nat_xcap) == xrel(natp, sp->sct_x) &&
-       yrel(natp, natp->nat_ycap) == yrel(natp, sp->sct_y)) {
-       sp->sct_newtype = SCT_AGRI;
-    }
-}
-
 void
 sct_init(coord x, coord y, s_char *ptr)
 {
index 1c489603767f9361eb67f4e6d29cb75b2fdca9e2..d404abefd2d307c1764d4e80e70fca5df182512a 100644 (file)
@@ -332,12 +332,6 @@ guerrilla(struct sctstr *sp)
        sp->sct_mobil = oldmob;
        civ += uw;
        uw = 0;
-       /*
-        * so we can't keep losing money by having
-        * our cap retaken
-        */
-       if (sp->sct_type == SCT_CAPIT && sp->sct_newtype == SCT_CAPIT)
-           sp->sct_newtype = SCT_AGRI;
        n = civ / 20;
        civ -= n;
        if (civ > ITEM_MAX) {