From bc72ff768f35b4d2067d0eaba1b66e36f0644032 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 16 May 2010 11:07:04 +0200 Subject: [PATCH] Fix lmine to use correct coordinate system 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/commands/mine.c b/src/lib/commands/mine.c index 02c61773..e10f31d3 100644 --- a/src/lib/commands/mine.c +++ b/src/lib/commands/mine.c @@ -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; }