diff --git a/ryzom/client/src/interface_v3/interface_3d_scene.h b/ryzom/client/src/interface_v3/interface_3d_scene.h index 7db17ae85..4117af403 100644 --- a/ryzom/client/src/interface_v3/interface_3d_scene.h +++ b/ryzom/client/src/interface_v3/interface_3d_scene.h @@ -403,6 +403,15 @@ public: float getTgtY() const { return _Target.y; } float getTgtZ() const { return _Target.z; } + float getRotZ() const { return _Rot.z; } + void setRotZ(float f) { _Rot.z = f; } + + float getRotY() const { return _Rot.y; } + void setRotY(float f) { _Rot.y = f; } + + float getDist() const { return _Dist; } + void setDist(float f) { _Dist = f; } + REFLECT_EXPORT_START(CInterface3DCamera, CInterfaceElement) REFLECT_FLOAT ("posx", getPosX, setPosX); REFLECT_FLOAT ("posy", getPosY, setPosY); @@ -410,19 +419,13 @@ public: REFLECT_FLOAT ("tgtx", getTgtX, setTgtX); REFLECT_FLOAT ("tgty", getTgtY, setTgtY); REFLECT_FLOAT ("tgtz", getTgtZ, setTgtZ); + REFLECT_FLOAT ("rotz", getRotZ, setRotZ); + REFLECT_FLOAT ("roty", getRotY, setRotY); + REFLECT_FLOAT ("dist", getDist, setDist); REFLECT_FLOAT ("fov", getFOV, setFOV); REFLECT_FLOAT ("roll", getRoll, setRoll); REFLECT_EXPORT_END - float getRotZ() const { return _Rot.z; } - void setRotZ(float f) { _Rot.z = f; } - - float getRotY() const { return _Rot.y; } - void setRotY(float f) { _Rot.y = f; } - - float getDist() const { return _Dist; } - void setDist(float f) { _Dist = f; } - void reset(); // Reset user interaction protected: diff --git a/ryzom/client/src/interface_v3/inventory_manager.cpp b/ryzom/client/src/interface_v3/inventory_manager.cpp index 56dbb176a..f8e3c587f 100644 --- a/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -1251,6 +1251,19 @@ void CInventoryManager::unequip(const std::string &invPath) } } +void CInventoryManager::onUpdateEquipHands() +{ + // update hands slots after initial BAG inventory has received + CCDBNodeLeaf *pNL; + pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:0:INDEX_IN_BAG", false); + if (pNL && pNL->getValue32() != 0) + _DBEquipObs.update(pNL); + + pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:1:INDEX_IN_BAG", false); + if (pNL && pNL->getValue32() != 0) + _DBEquipObs.update(pNL); +} + // *************************************************************************** // Observer on DB equipment branch diff --git a/ryzom/client/src/interface_v3/inventory_manager.h b/ryzom/client/src/interface_v3/inventory_manager.h index 1de2a674b..b6737b0ec 100644 --- a/ryzom/client/src/interface_v3/inventory_manager.h +++ b/ryzom/client/src/interface_v3/inventory_manager.h @@ -312,6 +312,7 @@ public: // Called on impulse void onReceiveItemInfo(const CItemInfos &itemInfo); void onRefreshItemInfoVersion(uint16 slotId, uint8 infoVersion); + void onUpdateEquipHands(); // Log for debug void debugItemInfoWaiters(); void debugItemInfoCache() const; diff --git a/ryzom/client/src/net_manager.cpp b/ryzom/client/src/net_manager.cpp index 549732372..5edefdf38 100644 --- a/ryzom/client/src/net_manager.cpp +++ b/ryzom/client/src/net_manager.cpp @@ -2890,6 +2890,8 @@ void impulseInitInventory (NLMISC::CBitMemStream &impulse) impulseUpdateInventory( impulse ); IngameDbMngr.setInitPacketReceived(); nlinfo( "DB_INIT:INV done (%u bytes)", impulse.getPos()-p ); + + getInventory().onUpdateEquipHands(); } //-----------------------------------------------