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

ServerEnvironment & StaticObject cleanups

* isFreeServerActiveObjectId is now part of ServerEnvironment
* getFreeServerActiveObjectId is now part of ServerEnvironment
* StaticObject constructor now take ServerActiveObject instead of type + string. This permits to remove a big string copy in some code parts
This commit is contained in:
Loic Blot 2018-03-09 08:25:48 +01:00 committed by Loïc Blot
parent def46c6cdb
commit 2c860a6a42
4 changed files with 48 additions and 30 deletions

View file

@ -19,7 +19,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "staticobject.h"
#include "util/serialize.h"
#include "log.h"
#include "content_sao.h"
StaticObject::StaticObject(const ServerActiveObject *s_obj, const v3f &pos_):
type(s_obj->getType()),
pos(pos_)
{
s_obj->getStaticData(&data);
}
void StaticObject::serialize(std::ostream &os)
{