From 772004d3fd8032f6397b43221227af488e82cfd4 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 21 Oct 2018 18:25:13 +0100 Subject: [PATCH] Fix editing slope xydirection with Lua --- src/lua_maplib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lua_maplib.c b/src/lua_maplib.c index 975ea1cb1..2ccb3b5f7 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -1374,6 +1374,8 @@ static int slope_set(lua_State *L) } case slope_xydirection: // xydirection slope->xydirection = luaL_checkangle(L, 3); + slope->d.x = -FINECOSINE((slope->xydirection>>ANGLETOFINESHIFT) & FINEMASK); + slope->d.y = -FINESINE((slope->xydirection>>ANGLETOFINESHIFT) & FINEMASK); P_CalculateSlopeNormal(slope); break; }