From 820faedb99af720b25a6f35cb66f7f4cec0f5e0c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 14 Dec 2008 13:20:49 -0500 Subject: [PATCH] Drop checks whether we can get the op-sector from mission() 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 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/lib/commands/miss.c b/src/lib/commands/miss.c index 2410557a..acd24b4e 100644 --- a/src/lib/commands/miss.c +++ b/src/lib/commands/miss.c @@ -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);