From: Pasi Kallinen Date: Wed, 16 Mar 2022 14:46:06 +0000 (+0200) Subject: Simplify abscoord code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49b26dbe99e805f9202bc3be484059eaef6b8a13;p=nethack Simplify abscoord code No need to call get_location_coord, as we're never dealing with random coordinates or rooms. --- diff --git a/src/sp_lev.c b/src/sp_lev.c index 44ea80e40..ddecbe129 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -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);