parent
de331b18e9
commit
e09c7fceaa
|
@ -2555,7 +2555,7 @@ and `minetest.auth_reload` call the authetification handler.
|
||||||
* `minetest.add_item(pos, item)`: Spawn item
|
* `minetest.add_item(pos, item)`: Spawn item
|
||||||
* Returns `ObjectRef`, or `nil` if failed
|
* Returns `ObjectRef`, or `nil` if failed
|
||||||
* `minetest.get_player_by_name(name)`: Get an `ObjectRef` to a player
|
* `minetest.get_player_by_name(name)`: Get an `ObjectRef` to a player
|
||||||
* `minetest.get_objects_inside_radius(pos, radius)`
|
* `minetest.get_objects_inside_radius(pos, radius)`: returns a list of ObjectRefs
|
||||||
* `radius`: using an euclidean metric
|
* `radius`: using an euclidean metric
|
||||||
* `minetest.set_timeofday(val)`
|
* `minetest.set_timeofday(val)`
|
||||||
* `val` is between `0` and `1`; `0` for midnight, `0.5` for midday
|
* `val` is between `0` and `1`; `0` for midnight, `0.5` for midday
|
||||||
|
|
|
@ -642,9 +642,11 @@ int ModApiEnvMod::l_get_objects_inside_radius(lua_State *L)
|
||||||
std::vector<u16>::const_iterator iter = ids.begin();
|
std::vector<u16>::const_iterator iter = ids.begin();
|
||||||
for(u32 i = 0; iter != ids.end(); ++iter) {
|
for(u32 i = 0; iter != ids.end(); ++iter) {
|
||||||
ServerActiveObject *obj = env->getActiveObject(*iter);
|
ServerActiveObject *obj = env->getActiveObject(*iter);
|
||||||
// Insert object reference into table
|
if (!obj->m_removed) {
|
||||||
script->objectrefGetOrCreate(L, obj);
|
// Insert object reference into table
|
||||||
lua_rawseti(L, -2, ++i);
|
script->objectrefGetOrCreate(L, obj);
|
||||||
|
lua_rawseti(L, -2, ++i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue