From b0880607d4f748ca00731e9c71bfb07b06c29e0f Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 29 Jul 2024 23:35:32 +0200 Subject: [PATCH] fix cassting, make one tic duration default, but can still pass ms to it --- src/lua_baselib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 381e20e79..097fa9f33 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3031,9 +3031,9 @@ static int lib_gPlayerDeviceRumble(lua_State *L) { INT32 player = -1; player_t *plr = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); // retrieve player - UINT16 low_strength = (INT32)luaL_checkinteger(L, 2); // low frequency rumble motor strenght - UINT16 high_strength = (INT32)luaL_checkinteger(L, 3); // high frequency rumble motor strenght - UINT32 duration = (INT32)luaL_checkinteger(L, 4); // duration of rumble in ms + UINT16 low_strength = (UINT16)luaL_checkinteger(L, 2); // low frequency rumble motor strenght + UINT16 high_strength = (UINT16)luaL_checkinteger(L, 3); // high frequency rumble motor strenght + UINT32 duration = (UINT32)luaL_optinteger(L, 4, 28); // duration of rumble in ms for (int i = 0; i < MAXSPLITSCREENPLAYERS; ++i) {