]> git.pond.sub.org Git - empserver/commitdiff
Fix autonav to use correct coordinate system
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 May 2010 11:52:14 +0000 (13:52 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 21 Jun 2010 19:03:21 +0000 (21:03 +0200)
When autonav reported to a ship owner that it can't load or unload
foreign civilians, it used the sector owner's coordinate system.  This
disclosed the sector owner's origin.  Abusable.

src/lib/update/nav_util.c

index 58c2a6319026d2d8f7dd3dc4ddffb09f51ce0a7c..d85fe8eb4e28dec4d69a08eaf4ce653b06529fdb 100644 (file)
@@ -68,7 +68,7 @@ load_it(struct shpstr *sp, struct sctstr *psect, int i)
     if (psect->sct_oldown != shipown && comm == I_CIVIL) {
        wu(0, shipown,
           "Ship #%d - unable to load disloyal civilians at %s.",
-          sp->shp_uid, xyas(psect->sct_x, psect->sct_y, psect->sct_own));
+          sp->shp_uid, xyas(psect->sct_x, psect->sct_y, shipown));
        return 0;
     }
     if (comm == I_CIVIL || comm == I_MILIT)
@@ -158,8 +158,7 @@ unload_it(struct shpstr *sp)
        if (sectp->sct_oldown != shipown && comm == I_CIVIL) {
            wu(0, sp->shp_own,
               "Ship #%d - unable to unload civilians into a disloyal sector at %s.",
-              sp->shp_uid, xyas(sectp->sct_x, sectp->sct_y,
-                                sectp->sct_own));
+              sp->shp_uid, xyas(sectp->sct_x, sectp->sct_y, sp->shp_own));
            continue;
        }
        if (comm == I_CIVIL)