(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
|
int
|
||||||
sctoff(coord x, coord y)
|
sctoff(coord x, coord y)
|
||||||
{
|
{
|
||||||
if ((x + y) & 01) {
|
if (CANT_HAPPEN((x + y) & 1))
|
||||||
logerror("%d,%d is an invalid sector specification!\n", x, y);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
return XYOFFSET(XNORM(x), YNORM(y));
|
||||||
return (YNORM(y) * WORLD_X + XNORM(x)) / 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
coord
|
coord
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue