diff options
| author | Alexander <alex@cogarr.net> | 2019-02-10 18:10:14 -0500 |
|---|---|---|
| committer | Alexander <alex@cogarr.net> | 2019-02-10 18:10:14 -0500 |
| commit | 5478f357b62062ffccfecb4c7b5fc607f0e7a518 (patch) | |
| tree | c850f7137cd350962c3911ce11f94da55f41d0d0 /src/shared/lua_api/load_phys.cpp | |
| parent | 6326eba6d844d079edf51b44bab8b9f9c21a8fb7 (diff) | |
| download | brokengine-5478f357b62062ffccfecb4c7b5fc607f0e7a518.tar.gz brokengine-5478f357b62062ffccfecb4c7b5fc607f0e7a518.tar.bz2 brokengine-5478f357b62062ffccfecb4c7b5fc607f0e7a518.zip | |
Corrected networking examples
changed the api for interacting with sockets, sockets
now have a callback, `socket:receive(function(stream) ... end)`, which
they can use to decide what to do when called.
Sockets also have a block:recv() function, which will block EVERYTHING
until the socket receives data. This should probably not be used.
Diffstat (limited to 'src/shared/lua_api/load_phys.cpp')
| -rw-r--r-- | src/shared/lua_api/load_phys.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/lua_api/load_phys.cpp b/src/shared/lua_api/load_phys.cpp index 7580e99..db35f37 100644 --- a/src/shared/lua_api/load_phys.cpp +++ b/src/shared/lua_api/load_phys.cpp @@ -6,7 +6,8 @@ void load_physfuncs(lua_State* L){ lua_newtable(L);//{} - lua_setglobal(L,"phys"); + lua_setglobal(L,"phys");// + lua_getglobal(L,"phys"); set_const(L,BT_DISABLE_WORLD_GRAVITY); set_const(L,BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT); set_const(L,BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_WORLD); |
