Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<class T>
- inline T ToEntity(int index, bool check = false)
- {
- const char *N = typeid(T).name();
- if(check)
- T *_temp = (T *)luaL_checkudata(oh->L, index, N);
- else
- T *_temp = (T *)lua_touserdata(oh->L, index, N);
- T var = *_temp;
- return var;
- }
Advertisement
Add Comment
Please, Sign In to add comment