]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/lndsub.c
Update known contributors comments
[empserver] / src / lib / subs / lndsub.c
index fe06901241aa960abbc75267e227f44c46294a62..b3483b79bf5f2222ad2286ff3567623f75d04c97 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
@@ -30,7 +29,7 @@
  *  Known contributors to this file:
  *     Ken Stevens, 1995
  *     Steve McClure, 1998-2000
- *     Markus Armbruster, 2004-2009
+ *     Markus Armbruster, 2004-2010
  */
 
 #include <config.h>
 #include <stdlib.h>
 #include "combat.h"
 #include "damage.h"
+#include "empobj.h"
 #include "file.h"
 #include "misc.h"
 #include "mission.h"
+#include "news.h"
 #include "nsc.h"
 #include "optlist.h"
 #include "path.h"
 #include "player.h"
 #include "prototypes.h"
-#include "xy.h"
-#include "empobj.h"
 #include "unit.h"
+#include "xy.h"
 
 static void lnd_stays(natid, char *, struct ulist *);
 static int lnd_hit_mine(struct lndstr *);
@@ -623,10 +623,11 @@ lnd_check_mines(struct emp_qelem *land_list)
        next = qp->q_back;
        llp = (struct ulist *)qp;
        getsect(llp->unit.land.lnd_x, llp->unit.land.lnd_y, &sect);
-       if (sect.sct_oldown == llp->unit.land.lnd_own)
-           continue;
        if (SCT_LANDMINES(&sect) == 0)
            continue;
+       if (relations_with(sect.sct_oldown, llp->unit.land.lnd_own)
+           == ALLIED)
+           continue;
        if (chance(DMINE_LHITCHANCE(sect.sct_mines) / (1 + 2 * with_eng))) {
            lnd_hit_mine(&llp->unit.land);
            sect.sct_mines--;