mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add callback on_mapblocks_changed
This commit is contained in:
parent
7701e70dc9
commit
5c248c2d7d
10 changed files with 141 additions and 6 deletions
|
@ -121,3 +121,12 @@ void warn_if_field_exists(lua_State *L, int table,
|
|||
|
||||
size_t write_array_slice_float(lua_State *L, int table_index, float *data,
|
||||
v3u16 data_size, v3u16 slice_offset, v3u16 slice_size);
|
||||
|
||||
// This must match the implementation in builtin/game/misc_s.lua
|
||||
// Note that this returns a floating point result as Lua integers are 32-bit
|
||||
inline lua_Number hash_node_position(v3s16 pos)
|
||||
{
|
||||
return (((s64)pos.Z + 0x8000L) << 32)
|
||||
| (((s64)pos.Y + 0x8000L) << 16)
|
||||
| ((s64)pos.X + 0x8000L);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue