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.
This commit is contained in:
parent
77e3a8fe31
commit
820faedb99
1 changed files with 0 additions and 6 deletions
|
@ -55,7 +55,6 @@ mission(void)
|
||||||
int mission;
|
int mission;
|
||||||
coord x, y;
|
coord x, y;
|
||||||
int desired_radius, radius;
|
int desired_radius, radius;
|
||||||
struct sctstr opsect;
|
|
||||||
union empobj_storage item;
|
union empobj_storage item;
|
||||||
struct empobj *gp;
|
struct empobj *gp;
|
||||||
int num = 0, mobmax, mobused;
|
int num = 0, mobmax, mobused;
|
||||||
|
@ -156,9 +155,6 @@ mission(void)
|
||||||
if (*p != '.') {
|
if (*p != '.') {
|
||||||
if (!sarg_xy(p, &x, &y))
|
if (!sarg_xy(p, &x, &y))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
||||||
if (!getsect(x, y, &opsect))
|
|
||||||
return RET_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->argp[5] != NULL) {
|
if (player->argp[5] != NULL) {
|
||||||
|
@ -195,8 +191,6 @@ mission(void)
|
||||||
if (*p == '.') {
|
if (*p == '.') {
|
||||||
x = gp->x;
|
x = gp->x;
|
||||||
y = gp->y;
|
y = gp->y;
|
||||||
if (!getsect(x, y, &opsect))
|
|
||||||
return RET_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
radius = oprange(gp, mission);
|
radius = oprange(gp, mission);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue