Simplify abscoord code

No need to call get_location_coord, as we're never dealing with
random coordinates or rooms.
This commit is contained in:
Pasi Kallinen
2022-03-16 16:46:06 +02:00
parent d76cf9377d
commit 49b26dbe99

View File

@@ -4932,7 +4932,8 @@ nhl_abs_coord(lua_State *L)
if (argc == 2) {
x = (xchar) lua_tointeger(L, 1);
y = (xchar) lua_tointeger(L, 2);
get_location_coord(&x, &y, ANY_LOC, NULL, SP_COORD_PACK(x,y));
x += g.xstart;
y += g.ystart;
} else
nhl_error(L, "nhl_abs_coord: Wrong args");
lua_pushinteger(L, x);