summaryrefslogtreecommitdiff
path: root/src/staticobject.cpp
Commit message (Collapse)AuthorAge
* (se)SerializeString: Include max length in the nameSmallJoker2020-10-01
| | | | | | | This commit clarifies the maximal length of the serialized strings. It will avoid accidental use of serializeString() when a larger string can be expected. Removes unused Wide String serialization functions
* Drop content_sao.{cpp,h}Loic Blot2020-04-11
| | | | | | | Move LuaEntitySAO to a new dedicated file Drop TestSAO (useless object) Drop the old static startup initialized SAO factory, which was pretty useless. This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
* Handle multiple deserialization of a block's entitiesRogier2019-08-12
| | | | | | | | | | | | | | | | | This fix consists of two parts: - Clear the list of stored entities. This has no side-effects. - Catch the case where active entities exist and print a message. Clearing the active entitiy list has side-effects that should be handled. (those entities are known to the environment and to clients). As avoiding those side-effects is more complex, and as this problem is not expected to occur (with PR #4847 merged), there is no real incentive to implement this ATM. This issue was a contributing factor to bug #4217. With the other contributing factor removed (PR #4847), this commit makes sure this factor does not go unnoticed if it ever happens again.
* ServerEnvironment & StaticObject cleanupsLoic Blot2018-03-09
| | | | | | * 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
* Modernize source code: last part (#6285)Loïc Blot2017-08-20
| | | | | | | | | | | * Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
* Define and use limit constants for Irrlicht fixed-width typeskwolekr2015-10-04
|
* Don't serialize StaticObjectList with > 65535 objectsKahrl2015-09-29
| | | | | | | | | | Because the count is serialized as u16, this would cause overflow. If minetest later deserialized a mapblock with an incorrect static object count, it would be unable to find the NameIdMapping (which comes after the StaticObjectList) and abort with an error such as "Invalid block data in database: unsupported NameIdMapping version" (issue #2610).
* Use std::vector instead of std::list in StaticObjectList and ↵Loic Blot2015-03-04
| | | | MutexedMap::getValues()
* serialize.h: use machine native byte swapping if available, fall-back to ↵Rafael Reilova2014-11-21
| | | | | | | | | | | | | | | | | | | | | previous generic method if not (supported for GCC using endian.h, detection done in cmake) write/readARGB8() - just write 32-bit color in one op, instead of 4 1-byte ops cleanup: removed unneeded buffer init for some serialize-out functions use a #define for the fixed point factor in read/writeF1000() nodemetadata.cpp, nodetimer.cpp optimzation: simpler deserialize node position method staticobject.cpp: cleanup: use util/serialize.h inlines instead of its own de/serialization serialize.cpp: minor optimization/cleanup: avoid generation of unneeded string temporary CMakeLists.txt, cmake_config.h.in: detection of endian.h config.h: added HAVE_ENDIAN_H Commits due to feedback squashed Signed-off-by: Craig Robbins <kde.psych@gmail.com>
* Migrate to STL containers/algorithms.Ilya Zhuravlev2013-03-11
|
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* Move util/serialize.h out from staticobject.h for smaller header dependenciesPerttu Ahola2012-11-26