mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
SAPI: Mark all Lua API functions requiring envlock
This commit is contained in:
parent
3936a5e3f7
commit
54f1267c2c
13 changed files with 141 additions and 37 deletions
|
@ -32,6 +32,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
// texture = e.g."default_wood.png"
|
||||
int ModApiParticles::l_add_particle(lua_State *L)
|
||||
{
|
||||
MAP_LOCK_REQUIRED;
|
||||
|
||||
// Get parameters
|
||||
v3f pos, vel, acc;
|
||||
pos = vel = acc = v3f(0, 0, 0);
|
||||
|
@ -119,6 +121,8 @@ int ModApiParticles::l_add_particle(lua_State *L)
|
|||
// texture = e.g."default_wood.png"
|
||||
int ModApiParticles::l_add_particlespawner(lua_State *L)
|
||||
{
|
||||
MAP_LOCK_REQUIRED;
|
||||
|
||||
// Get parameters
|
||||
u16 amount = 1;
|
||||
v3f minpos, maxpos, minvel, maxvel, minacc, maxacc;
|
||||
|
@ -208,6 +212,8 @@ int ModApiParticles::l_add_particlespawner(lua_State *L)
|
|||
// player (string) is optional
|
||||
int ModApiParticles::l_delete_particlespawner(lua_State *L)
|
||||
{
|
||||
MAP_LOCK_REQUIRED;
|
||||
|
||||
// Get parameters
|
||||
u32 id = luaL_checknumber(L, 1);
|
||||
std::string playername = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue