]> git.pond.sub.org Git - empserver/commitdiff
Make sure lmine can't lay seamines even when sector changes
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 14 Feb 2009 08:18:34 +0000 (09:18 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 16 Feb 2009 19:57:26 +0000 (20:57 +0100)
Reading the sector again invalidates the sector type check.  Bug can
currently bite only when the deity redesignates the sector.  Call
check_sect_ok() instead.

src/lib/commands/mine.c

index 5b530dfdff430bb9c7206ca5b81b14d6f41d66fb..21937453dbf1dd9fb4431a1e59796cb6531a4d14 100644 (file)
@@ -137,7 +137,7 @@ landmine(void)
            return RET_FAIL;
        if (mines_wanted == 0)
            continue;
-       if (!check_land_ok(&land))
+       if (!check_land_ok(&land) || !check_sect_ok(&sect))
            continue;
        land.lnd_mission = 0;
        total_mines_laid = 0;