]> git.pond.sub.org Git - empserver/commitdiff
Make lload and lunload work on foreign lands only when named
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 5 Jan 2009 12:50:20 +0000 (13:50 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 6 Jan 2009 15:02:51 +0000 (16:02 +0100)
load and unload work on foreign ships only when their argument
explicitely names them, i.e. you have to ask for them by number.  When
any other syntax is used, load() ignores foreign ships.  This makes
sense.  Change lload() to work just like that.

src/lib/commands/load.c

index 74a26e76025babd73e2e56bd9b0fa1c01e7e8af4..90b6f483c262e2530c167569faeab11e498ab995 100644 (file)
@@ -248,10 +248,12 @@ lload(void)
     while (nxtitem(&nbst, &land)) {
        if (land.lnd_own == 0)
            continue;
-
-       if (player->cnum != land.lnd_own &&
-           getrel(getnatp(land.lnd_own), player->cnum) != ALLIED)
-           continue;
+       if (player->cnum != land.lnd_own) {
+           if (!noisy)
+               continue;
+           if (getrel(getnatp(land.lnd_own), player->cnum) != ALLIED)
+               continue;
+       }
 
        if (!getsect(land.lnd_x, land.lnd_y, &sect))    /* XXX */
            continue;