X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgenericobject.cpp;h=d86c47eb93b565393dbc53fff49caeef7da89834;hb=b1e58c9c35ae3eb6167a0745086cdb0ddb1dd9d7;hp=482dbbc78d56eb2c05b287cc6bbd6e1cb9ef1210;hpb=e42eeec8f626acbaa54ae31c10ca06c868c7931c;p=dragonfireclient.git diff --git a/src/genericobject.cpp b/src/genericobject.cpp index 482dbbc78..d86c47eb9 100644 --- a/src/genericobject.cpp +++ b/src/genericobject.cpp @@ -1,6 +1,6 @@ /* -Minetest-c55 -Copyright (C) 2012 celeron55, Perttu Ahola +Minetest +Copyright (C) 2013 celeron55, Perttu Ahola This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -68,7 +68,7 @@ std::string gob_cmd_update_position( std::string gob_cmd_set_texture_mod(const std::string &mod) { std::ostringstream os(std::ios::binary); - // command + // command writeU8(os, GENERIC_CMD_SET_TEXTURE_MOD); // parameters os<first); - writeS16(os, i->second); - } + // command + writeU8(os, GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES); + // parameters + writeU8(os, 1); // version for forward compatibility + writeARGB8(os, color); return os.str(); } - +std::string gob_cmd_update_infant(u16 id, u8 type, + const 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<