]> git.pond.sub.org Git - empserver/commitdiff
Drop checks whether we can get the op-sector from mission()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 14 Dec 2008 18:20:49 +0000 (13:20 -0500)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 25 Dec 2008 10:47:32 +0000 (11:47 +0100)
getsect() can fail here only when the coordinates are invalid.  The
first check uses coordinates from a successful sarg_xy(), so they
can't be invalid.  The second check uses coordinates of an object to
be put on the mission.  If these are invalid, game state is corrupt,
and failing the mission command doesn't improve the situation a bit.

src/lib/commands/miss.c

index 2410557a169c67c435b532022afae977f6aee305..acd24b4e709093390f2fe7df831aae13dfd3d186 100644 (file)
@@ -55,7 +55,6 @@ mission(void)
     int mission;
     coord x, y;
     int desired_radius, radius;
-    struct sctstr opsect;
     union empobj_storage item;
     struct empobj *gp;
     int num = 0, mobmax, mobused;
@@ -156,9 +155,6 @@ mission(void)
     if (*p != '.') {
        if (!sarg_xy(p, &x, &y))
            return RET_SYN;
-
-       if (!getsect(x, y, &opsect))
-           return RET_FAIL;
     }
 
     if (player->argp[5] != NULL) {
@@ -195,8 +191,6 @@ mission(void)
        if (*p == '.') {
            x = gp->x;
            y = gp->y;
-           if (!getsect(x, y, &opsect))
-               return RET_FAIL;
        }
 
        radius = oprange(gp, mission);