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

Some progress on transitioning from MapBlockObject to ActiveObject.

This commit is contained in:
Perttu Ahola 2011-04-08 00:47:14 +03:00
parent 2dba606e12
commit 4b54b291ae
13 changed files with 522 additions and 40 deletions

View file

@ -80,4 +80,35 @@ void TestSAO::step(float dtime, Queue<ActiveObjectMessage> &messages)
}
/*
ItemSAO
*/
ItemSAO::ItemSAO(ServerEnvironment *env, u16 id, v3f pos,
const std::string inventorystring):
ServerActiveObject(env, id, pos),
m_inventorystring(inventorystring)
{
dstream<<"Server: ItemSAO created with inventorystring=\""
<<m_inventorystring<<"\""<<std::endl;
}
void ItemSAO::step(float dtime, Queue<ActiveObjectMessage> &messages)
{
}
std::string ItemSAO::getClientInitializationData()
{
dstream<<__FUNCTION_NAME<<std::endl;
std::string data;
data += itos(m_base_position.X);
data += ",";
data += itos(m_base_position.Y);
data += ",";
data += itos(m_base_position.Z);
data += ":";
data += m_inventorystring;
return data;
}