(sctoff): Oops on bad arguments. Recovery by returning -1 seems
dangerous. Not touching that now. (sctoff): Use XYOFFSET(). No functional change.
This commit is contained in:
parent
6d9e78af4c
commit
cc2629d6cf
1 changed files with 2 additions and 4 deletions
|
@ -167,11 +167,9 @@ yabs(struct natstr *np, coord rely)
|
|||
int
|
||||
sctoff(coord x, coord y)
|
||||
{
|
||||
if ((x + y) & 01) {
|
||||
logerror("%d,%d is an invalid sector specification!\n", x, y);
|
||||
if (CANT_HAPPEN((x + y) & 1))
|
||||
return -1;
|
||||
}
|
||||
return (YNORM(y) * WORLD_X + XNORM(x)) / 2;
|
||||
return XYOFFSET(XNORM(x), YNORM(y));
|
||||
}
|
||||
|
||||
coord
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue