]> git.pond.sub.org Git - empserver/commitdiff
Don't let players paradrop their own sectors
authorScott C. Zielinski <scottz@websagacity.com>
Sun, 27 Sep 2009 16:39:54 +0000 (12:39 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 8 Dec 2009 07:15:51 +0000 (08:15 +0100)
Such a paradrop always failed, and the paratroopers were lost.

src/lib/commands/para.c

index 10720cc3aadb915383dadc73a16db39c94c54b96..bb2e952da159242a73d81869aca97fca78fc6c89 100644 (file)
@@ -78,6 +78,10 @@ para(void)
     if (flightpath[ap_to_target - 1] == 'h')
        ap_to_target--;
     pr("range to target is %d\n", ap_to_target);
+    if (target.sct_own == player->cnum) {
+       pr("You can't air-assault your own sector!\n");
+           return RET_FAIL;
+       }
     /*
      * select planes within range
      */