diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 3f3971ed5..7431807cf 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -15,7 +15,7 @@ SaveConfig = 1; Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" // "Auto" will choose the best suited driver depending on hardware -FullScreen = 1; +FullScreen = 0; Width = 0; Height = 0; PositionX = 0; diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 1e6bcefe3..7f0222088 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -614,6 +614,8 @@ CClientConfig::CClientConfig() MaxMapScale = 2.0f; R2EDMaxMapScale = 8.0f; + TargetChangeCompass = true; + // VERBOSES VerboseVP = false; VerboseAnimUser = false; @@ -1495,6 +1497,9 @@ void CClientConfig::setValues() READ_FLOAT_FV(MaxMapScale); READ_FLOAT_FV(R2EDMaxMapScale); + // /tar to update compass or not + READ_BOOL_FV(TargetChangeCompass); + ///////////// // SHADOWS // // Shadows : Get Shadows state diff --git a/code/ryzom/client/src/client_cfg.h b/code/ryzom/client/src/client_cfg.h index af2e97bd3..7c1fa2ad6 100644 --- a/code/ryzom/client/src/client_cfg.h +++ b/code/ryzom/client/src/client_cfg.h @@ -607,6 +607,9 @@ struct CClientConfig float MaxMapScale; float R2EDMaxMapScale; + // If successfull /tar command should set compass or not + bool TargetChangeCompass; + ////////////// // VERBOSES // bool VerboseVP; diff --git a/code/ryzom/client/src/continent.cpp b/code/ryzom/client/src/continent.cpp index 51334195b..f0f007ef7 100644 --- a/code/ryzom/client/src/continent.cpp +++ b/code/ryzom/client/src/continent.cpp @@ -113,7 +113,7 @@ extern CContinentManager ContinentMngr; extern CEntityManager EntitiesMngr; //----------------------------------------------- -// CUserLandMark +// CUserLandMark //----------------------------------------------- NLMISC::CRGBA CUserLandMark::getColor () const @@ -742,20 +742,28 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress for (uint i = 0; i < zonesAdded.size(); i++) { - CSString luaScript; string luaScriptName = CPath::lookup(zonesAdded[i]+".lua", false); + if (!luaScriptName.empty()) { - luaScript.readFromFile(luaScriptName); - CLuaManager::getInstance().executeLuaScript(luaScript, true); - nlinfo("loading %s", luaScriptName.c_str()); + CIFile in; + if (in.open(luaScriptName)) + { + + string luaScript; + if (in.readAll(luaScript)) + { + CLuaManager::getInstance().executeLuaScript(luaScript, true); + nlinfo("loading %s", luaScriptName.c_str()); + } + } } else { nlinfo("file not found %s", luaScriptName.c_str()); } } - + LandscapeIGManager.unloadArrayZoneIG(zonesRemoved); LandscapeIGManager.loadArrayZoneIG(zonesAdded, &igAdded); } diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index d25173982..10b1474bb 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -2476,16 +2476,19 @@ class CAHTarget : public IActionHandler if (entity && entity->properties().selectable() && !entity->getDisplayName().empty()) { UserEntity->selection(entity->slot()); - CGroupCompas *gc = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass")); - if (gc) + if (ClientCfg.TargetChangeCompass) { - CCompassTarget ct; - ct.setType(CCompassTarget::Selection); + CGroupCompas *gc = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass")); + if (gc) + { + CCompassTarget ct; + ct.setType(CCompassTarget::Selection); - gc->setActive(true); - gc->setTarget(ct); - gc->blink(); - CWidgetManager::getInstance()->setTopWindow(gc); + gc->setActive(true); + gc->setTarget(ct); + gc->blink(); + CWidgetManager::getInstance()->setTopWindow(gc); + } } } else if (!quiet) @@ -4647,45 +4650,7 @@ public: } }; REGISTER_ACTION_HANDLER( CHandlerSortTribeFame, "sort_tribefame"); - -// *************************************************************************** -class CHandlerOutgameNaviGetKeys : public IActionHandler -{ - virtual void execute (CCtrlBase *pCaller, const std::string &Params) - { - if (!pCaller->getParent()) - return; - - if (pCaller->getParent()->getId() != "ui:outgame") - return; - - if (Params.empty()) - { - sint32 event = -1; - - if (Driver->AsyncListener.isKeyPushed(KeyESCAPE)) event = 0; - if (Driver->AsyncListener.isKeyPushed(KeyDELETE)) event = 1; - if (Driver->AsyncListener.isKeyPushed(KeyRETURN)) event = 2; - if (Driver->AsyncListener.isKeyPushed(KeyDOWN)) event = 3; - if (Driver->AsyncListener.isKeyPushed(KeyUP)) event = 4; - if (Driver->AsyncListener.isKeyPushed(KeyI)) event = 5; - if (Driver->AsyncListener.isKeyPushed(KeyP)) event = 6; - if (Driver->AsyncListener.isKeyPushed(KeyE)) event = 7; - if (Driver->AsyncListener.isKeyPushed(KeyLEFT)) event = 8; - if (Driver->AsyncListener.isKeyPushed(KeyRIGHT)) event = 9; - - std::string id = "create"; - if (pCaller->getId() == "ui:outgame:charsel") - id = "sel"; - - if (event != -1) - CLuaManager::getInstance().executeLuaScript(toString("outgame:eventChar%sKeyGet(%i)", id.c_str(), event)); - } - // reset previous input - Driver->AsyncListener.reset(); - } -}; -REGISTER_ACTION_HANDLER( CHandlerOutgameNaviGetKeys, "navigate_outgame" ); +(??) // *************************************************************************** class CHandlerTriggerIconBuffs : public IActionHandler diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index fe7c3b281..8a3064a12 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -100,7 +100,6 @@ void CControlSheetInfoWaiter::infoReceived() ucstring CControlSheetInfoWaiter::infoValidated() const { ucstring help; - if (CtrlSheet && !LuaMethodName.empty()) { // delegate setup of context he help ( & window ) to lua @@ -3396,6 +3395,9 @@ void CDBCtrlSheet::getContextHelp(ucstring &help) const // call lua function to update tooltip window _ItemInfoWaiter.sendRequest(); help = _ItemInfoWaiter.infoValidated(); + // its expected to get at least item name back + if (help.empty()) + help = getItemActualName(); } else if (!_ContextHelp.empty()) { diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index c323c324b..789e33618 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -4080,6 +4080,7 @@ int CLuaIHMRyzom::readUserChannels(CLuaState &ls) return 1; } +// *************************************************************************** int CLuaIHMRyzom::saveUserChannels(CLuaState &ls) { const char *funcName = "saveUserChannels";