1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

preliminary lua scripting framework for objects

This commit is contained in:
Perttu Ahola 2011-02-21 16:10:36 +02:00
parent c57637b4c3
commit 69dbc046eb
81 changed files with 18685 additions and 193 deletions

View file

@ -1056,6 +1056,8 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
for all added objects {
u16 id
u8 type
u16 initialization data length
string initialization data
}
*/
@ -1090,10 +1092,11 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
u16 id = readU16((u8*)buf);
is.read(buf, 1);
u8 type = readU8((u8*)buf);
std::string data = deSerializeLongString(is);
// Add it
{
JMutexAutoLock envlock(m_env_mutex);
m_env.addActiveObject(id, type);
m_env.addActiveObject(id, type, data);
}
}
}