From 855410f3d0788d2e05d3984dc1aac93b8497fe7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Gon=C3=A7alves=20=28Ulukyn=29?= Date: Thu, 13 Jan 2022 16:28:47 +0000 Subject: [PATCH 1/3] Resolve "Add ability to have translated titles with untraslated fields" --- ryzom/client/src/string_manager_client.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ryzom/client/src/string_manager_client.cpp b/ryzom/client/src/string_manager_client.cpp index 1ff55c54b..74f650b1e 100644 --- a/ryzom/client/src/string_manager_client.cpp +++ b/ryzom/client/src/string_manager_client.cpp @@ -1630,7 +1630,7 @@ const char *CStringManagerClient::getSPhraseLocalizedDescription(NLMISC::CSheetI const char *CStringManagerClient::getTitleLocalizedName(const string &titleId, bool women) { vector listInfos = getTitleInfos(titleId, women); - + if (!listInfos.empty()) { _TitleWords.push_back(listInfos[0]); @@ -1681,7 +1681,19 @@ vector CStringManagerClient::getTitleInfos(const string &titleId, bool w { if (titleId[0] != '#') { - listInfos[0] = getSpecialWord(listInfos[0], women); + // Check special case like SON_OF|jane|joe (with SON_OF = "Son of {1} and {2}") + vector titleReps; + splitString(listInfos[0], string("|"), titleReps); + if (titleReps.size() > 1) + { + listInfos[0] = getSpecialWord(titleReps[0], women); + for(uint i=1; i < titleReps.size(); ++i ) + { + while(strFindReplace(listInfos[0], toString("{%d}", i), titleReps[i])); + } + } + else + listInfos[0] = getSpecialWord(listInfos[0], women); } } From 22b4c074e867a7dcf95ed9243cc39229ce9601cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Gon=C3=A7alves=20=28Ulukyn=29?= Date: Thu, 13 Jan 2022 16:28:52 +0000 Subject: [PATCH 2/3] Resolve "Remove Open menu option from scroll items when item use a Scroll.Label" --- ryzom/client/src/interface_v3/action_handler_item.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryzom/client/src/interface_v3/action_handler_item.cpp b/ryzom/client/src/interface_v3/action_handler_item.cpp index 67f0d18ee..ff4034b3d 100644 --- a/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -1881,7 +1881,7 @@ class CHandlerItemMenuCheck : public IActionHandler } if (pItemTextDisplay && pIS->Family == ITEMFAMILY::SCROLL) { - if (pCS->getInventoryIndex()==INVENTORIES::bag) + if (pCS->getInventoryIndex()==INVENTORIES::bag && pIS->Scroll.Label.empty()) pItemTextDisplay->setActive(true); pItemInfos->setActive(false); } From 5c264fad52905c482a3496f03a4366623dc4138d Mon Sep 17 00:00:00 2001 From: Nuno Date: Thu, 13 Jan 2022 17:43:27 +0100 Subject: [PATCH 3/3] Add smooth resizing of entitie when VPB are changed (wip) --- ryzom/client/src/character_cl.cpp | 41 ++++++++++++++++++++++++++++--- ryzom/client/src/character_cl.h | 5 ++++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/ryzom/client/src/character_cl.cpp b/ryzom/client/src/character_cl.cpp index c157c0f85..0fa4e357e 100644 --- a/ryzom/client/src/character_cl.cpp +++ b/ryzom/client/src/character_cl.cpp @@ -377,6 +377,9 @@ CCharacterCL::CCharacterCL() _CustomScale = 1.f; + _OldCustomScale = 0.f; + _StepCustomScale = 0.f; + _StartCustomScale = ryzomGetLocalTime(); }// CCharacterCL // //----------------------------------------------- @@ -1690,13 +1693,38 @@ void CCharacterCL::updateVisualPropertyVpb(const NLMISC::TGameCycle &/* gameCycl nlinfo("(%05d,%03d) CH:updtVPVpb:%d: Scale(%d)", sint32(T1%100000), NetMngr.getCurrentServerTick(), _Slot, (uint)altLookProp.PropertySubData.Scale); } - // Save old scale - float oldCustomScale = _CustomScale; + + float customScale; // Set new scale if (altLookProp.PropertySubData.Scale==0) - _CustomScale = 1.f; + customScale = 1.f; else - _CustomScale = (float)altLookProp.PropertySubData.Scale/100.f; + customScale = ((float)altLookProp.PropertySubData.Scale/100.f); + nlinfo("customScale = %f", customScale); + _StartCustomScale = ryzomGetLocalTime(); + if (_OldCustomScale == 0) // first time + { + _StartCustomScale -= 1001.f; + _OldCustomScale = 1.f; + _CustomScale = 1.f; + } + + _StepCustomScale = customScale - _CustomScale; + _OldCustomScale = _CustomScale; +} + +void CCharacterCL::scale(bool calculate) +{ + // Save old scale + float oldCustomScale = _CustomScale; + _CustomScale = _OldCustomScale + (float(ryzomGetLocalTime() - _StartCustomScale) / 1000.f) * _StepCustomScale; + if ((_StepCustomScale >= 0 && _CustomScale > _OldCustomScale+_StepCustomScale) + || (_StepCustomScale < 0 && _CustomScale < _OldCustomScale+_StepCustomScale)) + { + _CustomScale = _OldCustomScale+_StepCustomScale; + _StepCustomScale = 0; + } + // Apply modification _CustomScalePos /= oldCustomScale; _CustomScalePos *= _CustomScale; @@ -2121,6 +2149,7 @@ double CCharacterCL::computeSpeed() //----------------------------------------------- double CCharacterCL::computeSpeedFactor(double speedToDest) { + double speedFactor = 1.0; // \todo GUIGUI : optimize emotes, currently it's badly designed. @@ -6047,6 +6076,9 @@ void CCharacterCL::updateAttachedFX() //----------------------------------------------- void CCharacterCL::updateVisible (const TTime ¤tTimeInMs, CEntityCL *target) { + if (_StepCustomScale) + scale(); + // Changes the skeleton state if(!_Skeleton.empty()) { @@ -6562,6 +6594,7 @@ ADD_METHOD(void CCharacterCL::updatePos(const TTime ¤tTimeInMs, CEntityCL _OldAutomaton = _CurrentAutomaton; // Compute the Time Step. double frameTimeRemaining = computeTimeStep(((double)currentTimeInMs)*0.001); + // Update the LodCharacter Animation. if(_LodCharacterAnimEnabled) { diff --git a/ryzom/client/src/character_cl.h b/ryzom/client/src/character_cl.h index 98b5d374e..8c6cd32db 100644 --- a/ryzom/client/src/character_cl.h +++ b/ryzom/client/src/character_cl.h @@ -712,6 +712,9 @@ protected: sint64 _LastSelectBoxComputeTime; float _CustomScale; + float _OldCustomScale; + float _StepCustomScale; + NLMISC::TTime _StartCustomScale; /// Pointer on the Sheet with basic parameters. const CCharacterSheet *_Sheet; @@ -872,6 +875,8 @@ protected: /// Method to Flag the character as alive and do everything needed. virtual void setAlive(); + void scale(bool calculate = true); + /// double computeTimeStep(const double ¤tTime);