From 4aa9a669cb184b77213e8df82eb20eda5aad9004 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Mon, 29 Jul 2019 19:14:07 +0200 Subject: ContentCAO: Fix broken attachments on join (#8701) What happened: 1) Object data is received. Client begins to read the data 2) Client initializes all its children (gob_cmd_update_infant) 3) Children try to attach to parent (yet not added) 4) Parent initializes, is added to the environment And somewhere in between, Irrlicht wrecks up the attachments due to the missing matrix node. The solution here is to: 1) Use the same structure as ServerActiveObject 2) Attach all children after the parent is really initialized --- src/client/clientenvironment.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/client/clientenvironment.h') diff --git a/src/client/clientenvironment.h b/src/client/clientenvironment.h index 4fa3f4848..f182b5951 100644 --- a/src/client/clientenvironment.h +++ b/src/client/clientenvironment.h @@ -138,8 +138,6 @@ public: std::vector &objects ); - u16 attachement_parent_ids[USHRT_MAX + 1]; - const std::list &getPlayerNames() { return m_player_names; } void addPlayerName(const std::string &name) { m_player_names.push_back(name); } void removePlayerName(const std::string &name) { m_player_names.remove(name); } -- cgit v1.2.3