]> git.pond.sub.org Git - empserver/commitdiff
Permit ships to assault the sector they're in
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 24 Apr 2008 18:38:57 +0000 (20:38 +0200)
committerMarkus Armbruster <armbru@pike.pond.sub.org>
Wed, 7 May 2008 08:33:42 +0000 (10:33 +0200)
Ships still have to be in a sea sector to assault an adjacent sector.

src/lib/subs/attsub.c

index 5183b2a5a7f0d3b668c325cc3fd0d1cbd33a8b75..d3d6c5c3048a9f9f7a5e7e75ce0cba1e0a1030ec 100644 (file)
@@ -461,6 +461,7 @@ att_abort(int combat_mode, struct combat *off, struct combat *def)
        if (att_get_combat(off, 0) < 0)
            return abort_attack();
        if (off->type == EF_SHIP &&
        if (att_get_combat(off, 0) < 0)
            return abort_attack();
        if (off->type == EF_SHIP &&
+           !(off->x == def->x && off->y == def->y) &&
            (!getsect(off->x, off->y, &sect) ||
             sect.sct_type != SCT_WATER)) {
            pr("%s can not %s from that far inland!\n",
            (!getsect(off->x, off->y, &sect) ||
             sect.sct_type != SCT_WATER)) {
            pr("%s can not %s from that far inland!\n",