diff options
Diffstat (limited to 'src/genericobject.cpp')
-rw-r--r-- | src/genericobject.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/genericobject.cpp b/src/genericobject.cpp index 482dbbc78..480c4209d 100644 --- a/src/genericobject.cpp +++ b/src/genericobject.cpp @@ -104,23 +104,25 @@ std::string gob_cmd_set_animations(v2f frames, float frame_speed, float frame_bl return os.str(); } -// Part of the attachment structure, not used yet! -std::string gob_cmd_set_attachment() // <- parameters here +std::string gob_cmd_set_bone_posrot(std::string bone, v3f position, v3f rotation) { std::ostringstream os(std::ios::binary); // command - writeU8(os, GENERIC_CMD_SET_ATTACHMENT); + writeU8(os, GENERIC_CMD_SET_BONE_POSROT); // parameters - // Parameters go here + os<<serializeString(bone); + writeV3F1000(os, position); + writeV3F1000(os, rotation); return os.str(); } -std::string gob_cmd_set_bone_posrot(std::string bone, v3f position, v3f rotation) +std::string gob_cmd_set_attachment(int parent_id, std::string bone, v3f position, v3f rotation) { std::ostringstream os(std::ios::binary); // command - writeU8(os, GENERIC_CMD_SET_BONE_POSROT); + writeU8(os, GENERIC_CMD_SET_ATTACHMENT); // parameters + writeS16(os, parent_id); os<<serializeString(bone); writeV3F1000(os, position); writeV3F1000(os, rotation); |