]> git.pond.sub.org Git - empserver/commitdiff
Fix lmine to use correct coordinate system
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 May 2010 09:07:04 +0000 (11:07 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 21 Jun 2010 19:03:21 +0000 (21:03 +0200)
It reported the engineer's location in the engineer's coordinate
system instead of the player's.  Fortunately, they're the same in
normal usage.  They can differ only when a deity uses a foreign
engineer.

The buggy code is also reachable from and march sub-command 'd', but
can't bite there, because even deities can't march foreign land units.

src/lib/commands/mine.c

index 02c617739dcfdb41265f7fde630f036004aaf970..e10f31d3e36ff3c51e51dd5dfaa1b772f8ae65f2 100644 (file)
@@ -152,7 +152,7 @@ landmine(void)
        if (total_mines_laid == mines_wanted) {
            pr("%s laid a total of %d mines in %s",
               prland(&land), total_mines_laid,
-              xyas(sect.sct_x, sect.sct_y, land.lnd_own));
+              xyas(sect.sct_x, sect.sct_y, player->cnum));
            if (!land.lnd_item[I_SHELL])
                pr(" but is now out of shells\n");
            else
@@ -163,7 +163,7 @@ landmine(void)
               prland(&land),
               land.lnd_mobil > 0 ? "shells" : "mobility",
               total_mines_laid,
-              xyas(sect.sct_x, sect.sct_y, land.lnd_own));
+              xyas(sect.sct_x, sect.sct_y, player->cnum));
     }
     return RET_OK;
 }