Skip to content

Commit deb87e6

Browse files
committed
Version 0.6.4
* Treat lightuserdata as cdata pointer too
1 parent 56e0250 commit deb87e6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ function t.OnTick()
118118

119119
UIFEED:_UI_FEED_POST_SAMPLE_TOAST(duration, data, true, true)
120120
end
121+
121122
-- If you press F9 it will knock out all peds around you
122-
if mish.iskeyjustup(VK_F9, true) then
123+
if misc.iskeyjustup(VK_F9, true) then
123124
local cnt = native.allpeds(t.ent_arr) - 1
124125
for i = 0, cnt do
125126
if t.ent_arr[i] ~= t.me_ent then

src/native/call.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ static int native_prepare_arg(lua_State *L, NativeParam *param, bool vector_allo
7373
case LUA_TUSERDATA:
7474
return native_prepare_nobj(L, param, vector_allowed, idx);
7575
case 10/*LUA_TCDATA*/:
76-
if (!param || (param->type == NTYPE_ANY && param->isPointer))
76+
case LUA_TLIGHTUSERDATA:
77+
if (!param || param->isPointer)
7778
return (nativePush(lua_topointer(L, idx)), 1);
7879
break;
7980
}

0 commit comments

Comments
 (0)