]> git.pond.sub.org Git - empserver/commitdiff
Fix sweep command to use correct coordinate system
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 May 2010 18:18:14 +0000 (20:18 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 21 Jun 2010 19:01:30 +0000 (21:01 +0200)
When reporting sweeps, it reported the location in the plane owner's
coordinate system instead of the player's.  Fortunately, they're the
same in normal usage.  They can differ only when a deity flies foreign
planes.

src/lib/subs/plnsub.c

index 924f59c237c98877ba8c01e93f54d03db2676284..54f870d5c648d9a46faf92a5afa374ec98c0c230 100644 (file)
@@ -943,7 +943,7 @@ plane_sweep(struct emp_qelem *plane_list, coord x, coord y)
 
        if (chance((100.0 - pln_acc(pp)) / 100.0)) {
            pr("Sweep! in %s\n",
 
        if (chance((100.0 - pln_acc(pp)) / 100.0)) {
            pr("Sweep! in %s\n",
-              xyas(sect.sct_x, sect.sct_y, pp->pln_own));
+              xyas(sect.sct_x, sect.sct_y, player->cnum));
            mines_there--;
            found = 1;
        }
            mines_there--;
            found = 1;
        }