diff options
author | Foghrye4 <foghrye4@gmail.com> | 2016-10-08 16:51:25 +0400 |
---|---|---|
committer | Ner'zhul <nerzhul@users.noreply.github.com> | 2016-10-08 14:51:25 +0200 |
commit | ad163ee5c3f7d6ca31e0add052fb76466a9bfcc8 (patch) | |
tree | 6eebdb83bb210f4f57caa4a0f57189d95666d9c2 /src/genericobject.cpp | |
parent | 9978d0796fa61eabb235d715a56ad6e5396d2e1e (diff) | |
download | hax-minetest-server-ad163ee5c3f7d6ca31e0add052fb76466a9bfcc8.tar.gz hax-minetest-server-ad163ee5c3f7d6ca31e0add052fb76466a9bfcc8.zip |
Prevent attached models from disappearing during parent reload (#4128)
Diffstat (limited to '')
-rw-r--r-- | src/genericobject.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/genericobject.cpp b/src/genericobject.cpp index 368cae1ff..c4660cf44 100644 --- a/src/genericobject.cpp +++ b/src/genericobject.cpp @@ -182,3 +182,15 @@ std::string gob_cmd_update_nametag_attributes(video::SColor color) writeARGB8(os, color); return os.str(); } + +std::string gob_cmd_update_infant(u16 id, u8 type, std::string client_initialization_data) +{ + std::ostringstream os(std::ios::binary); + // command + writeU8(os, GENERIC_CMD_SPAWN_INFANT); + // parameters + writeU16(os, id); + writeU8(os, type); + os<<serializeLongString(client_initialization_data); + return os.str(); +} |