diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg
index 4b0e70e76..28633ff0b 100644
--- a/code/ryzom/client/client_default.cfg
+++ b/code/ryzom/client/client_default.cfg
@@ -1,576 +1,584 @@
-//////////////////////////
-//////////////////////////
-/// CLIENT CONFIG FILE ///
-//////////////////////////
-//////////////////////////
-
-
-// If you set this variable to 1, your client.cfg will be overwritten when you quit the client.
-// You will loose all the comments and identation in this file.
-SaveConfig = 1;
-
-///////////////////
-// WINDOW CONFIG //
-///////////////////
-
-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;
-Width = 0;
-Height = 0;
-PositionX = 0;
-PositionY = 0;
-Frequency = 0;
-Depth = 32;
-Sleep = -1;
-ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time
-Contrast = 0.0; // -1.0 ~ 1.0
-Luminosity = 0.0; // -1.0 ~ 1.0
-Gamma = 0.0; // -1.0 ~ 1.0
-Contrast_min = -1.0;
-Luminosity_min = -1.0;
-Gamma_min = -1.0;
-Contrast_max = 1.0;
-Luminosity_max = 1.0;
-Gamma_max = 1.0;
-
-
-/////////////
-// NETWORK //
-/////////////
-
-Application = { "ryzom_live", "./client_ryzom_r.exe", "./" };
-BackgroundDownloader = 0;
-PatchServer = "http://dl.ryzom.com/patch_live";
-StartupHost = "shard.ryzom.com:40916";
-StartupPage = "/login/r2_login.php";
-InstallStatsUrl = "";
-
-ConditionsTermsURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/21885/1&post148782=en#1";
-LoginSupportURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/22047/1&post149889=en#1";
-
-
-////////////////
-// INTERFACES //
-////////////////
-
-// the language to use as in ISO 639-2
-LanguageCode = "en"; // english
-
-XMLInputFile = "input_config_v3.xml";
-
-XMLLoginInterfaceFiles = {
- "login_config.xml",
- "login_widgets.xml",
- "login_main.xml",
- "login_keys.xml",
-};
-
-XMLOutGameInterfaceFiles = {
- "out_v2_config.xml",
- "out_v2_widgets.xml",
- "out_v2_connect.xml",
- "out_v2_intro.xml",
- "out_v2_select.xml",
- "out_v2_appear.xml",
- "out_v2_location.xml",
- "out_v2_crash.xml",
- "out_v2_hierarchy.xml",
- "out_v2_keys.xml",
-};
-
-// The ligo primitive class file
-LigoPrimitiveClass = "world_editor_classes.xml";
-
-VerboseLog = 1;
-
-///////////
-// MOUSE //
-///////////
-HardwareCursor = 1;
-
-CursorSpeed = 1.0; // In pixels per mickey
-CursorSpeed_min = 0.5;
-CursorSpeed_max = 2.0;
-
-CursorAcceleration = 40; // Threshold in mickey
-CursorAcceleration_min = 20;
-CursorAcceleration_max = 80;
-
-FreeLookSpeed = 0.004; // In radian per mickey
-FreeLookSpeed_min = 0.0001;
-FreeLookSpeed_max = 0.01;
-
-FreeLookAcceleration = 40; // Threshold in mickey
-FreeLookAcceleration_min = 20;
-FreeLookAcceleration_max = 80;
-
-FreeLookInverted = 0;
-AutomaticCamera = 0;
-DblClickMode = 1;
-AutoEquipTool = 1;
-
-///////////////////
-// RENDER CONFIG //
-///////////////////
-
-// NB: thoses variables configure also the InGameConfigurator:
-// _min and _max define the bounds
-// _step defines the step (NB: take care of _min and _max!!)
-// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one
-
-
-// *** LANDSCAPE
-LandscapeTileNear = 50.000000;
-LandscapeTileNear_min = 20.000000;
-LandscapeTileNear_max = 100.000000;
-LandscapeTileNear_step = 10.0;
-LandscapeTileNear_ps0 = 20.0;
-LandscapeTileNear_ps1 = 40.0;
-LandscapeTileNear_ps2 = 50.0;
-LandscapeTileNear_ps3 = 80.0;
-
-// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible
-LandscapeThreshold = 1000.0;
-LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold
-LandscapeThreshold_max = 2000.0; // High quality => 0.0005 threshold
-LandscapeThreshold_step = 100.0;
-LandscapeThreshold_ps0 = 100.0;
-LandscapeThreshold_ps1 = 500.0;
-LandscapeThreshold_ps2 = 1000.0;
-LandscapeThreshold_ps3 = 2000.0;
-
-Vision = 500.000000;
-Vision_min = 200.000000;
-Vision_max = 800.000000;
-Vision_step = 100.000000;
-Vision_ps0 = 200.0;
-Vision_ps1 = 400.0;
-Vision_ps2 = 500.0;
-Vision_ps3 = 800.0;
-
-MicroVeget = 1; // Enable/Disable MicroVeget.
-MicroVeget_ps0 = 0;
-MicroVeget_ps1 = 1;
-MicroVeget_ps2 = 1;
-MicroVeget_ps3 = 1;
-
-MicroVegetDensity = 80.0;
-MicroVegetDensity_min = 10.0;
-MicroVegetDensity_max = 100.0;
-MicroVegetDensity_step = 10.0;
-MicroVegetDensity_ps0 = 10.0; // not used since disabled!
-MicroVegetDensity_ps1 = 30.0;
-MicroVegetDensity_ps2 = 80.0;
-MicroVegetDensity_ps3 = 100.0;
-
-
-// *** FX
-FxNbMaxPoly = 20000;
-FxNbMaxPoly_min = 2000;
-FxNbMaxPoly_max = 50000;
-FxNbMaxPoly_step= 2000;
-FxNbMaxPoly_ps0 = 2000;
-FxNbMaxPoly_ps1 = 10000;
-FxNbMaxPoly_ps2 = 20000;
-FxNbMaxPoly_ps3 = 50000;
-
-Cloud = 1;
-Cloud_ps0 = 0 ;
-Cloud_ps1 = 1 ;
-Cloud_ps2 = 1 ;
-Cloud_ps3 = 1 ;
-
-CloudQuality = 160.0;
-CloudQuality_min = 80.0;
-CloudQuality_max = 320.0;
-CloudQuality_step = 20.0;
-CloudQuality_ps0 = 80.0; // not used since disabled!
-CloudQuality_ps1 = 80.0;
-CloudQuality_ps2 = 160.0;
-CloudQuality_ps3 = 320.0;
-
-CloudUpdate = 1;
-CloudUpdate_min = 1;
-CloudUpdate_max = 8;
-CloudUpdate_step= 1;
-CloudUpdate_ps0 = 1; // not used since disabled!
-CloudUpdate_ps1 = 1;
-CloudUpdate_ps2 = 1;
-CloudUpdate_ps3 = 3;
-
-Shadows = 1;
-Shadows_ps0 = 0;
-Shadows_ps1 = 1;
-Shadows_ps2 = 1;
-Shadows_ps3 = 1;
-
-FXAA = 1;
-FXAA_ps0 = 0;
-FXAA_ps1 = 1;
-FXAA_ps2 = 1;
-FXAA_ps3 = 1;
-
-AnisotropicFilter = 0;
-
-Bloom = 1;
-Bloom_ps0 = 0;
-Bloom_ps1 = 1;
-Bloom_ps2 = 1;
-Bloom_ps3 = 1;
-
-SquareBloom = 1;
-SquareBloom_ps0 = 0;
-SquareBloom_ps1 = 1;
-SquareBloom_ps2 = 1;
-SquareBloom_ps3 = 1;
-
-DensityBloom = 255.0;
-DensityBloom_min = 0.0;
-DensityBloom_max = 255.0;
-DensityBloom_step = 1.0;
-DensityBloom_ps0 = 255.0;
-DensityBloom_ps1 = 255.0;
-DensityBloom_ps2 = 255.0;
-DensityBloom_ps3 = 255.0;
-
-
-// *** CHARACTERS
-SkinNbMaxPoly = 100000;
-SkinNbMaxPoly_min = 5000;
-SkinNbMaxPoly_max = 250000;
-SkinNbMaxPoly_step = 5000;
-SkinNbMaxPoly_ps0 = 10000;
-SkinNbMaxPoly_ps1 = 70000;
-SkinNbMaxPoly_ps2 = 100000;
-SkinNbMaxPoly_ps3 = 200000;
-
-NbMaxSkeletonNotCLod = 125;
-NbMaxSkeletonNotCLod_min = 5;
-NbMaxSkeletonNotCLod_max = 255;
-NbMaxSkeletonNotCLod_step = 5;
-NbMaxSkeletonNotCLod_ps0 = 10;
-NbMaxSkeletonNotCLod_ps1 = 50;
-NbMaxSkeletonNotCLod_ps2 = 125;
-NbMaxSkeletonNotCLod_ps3 = 255;
-
-CharacterFarClip = 200.0;
-CharacterFarClip_min = 50.0;
-CharacterFarClip_max = 500.0;
-CharacterFarClip_step = 10.0;
-CharacterFarClip_ps0 = 50.0;
-CharacterFarClip_ps1 = 100.0;
-CharacterFarClip_ps2 = 200.0;
-CharacterFarClip_ps3 = 500.0;
-
-EnableRacialAnimation = 1;
-
-// *** MISC
-// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance
-ScreenAspectRatio = 0.0;
-ForceDXTC = 1; // Enable/Disable DXTC.
-DivideTextureSizeBy2= 0; // Divide texture size
-DisableVtxProgram = 0; // Disable Hardware Vertex Program.
-DisableVtxAGP = 0; // Disable Hardware Vertex AGP.
-DisableTextureShdr = 0; // Disable Hardware Texture Shader.
-HDEntityTexture = 1;
-HDTextureInstalled = 1;
-WaitVBL = 0; // 0 or 1 to wait Vertical Sync.
-
-//////////////////
-// GAME OPTIONS //
-//////////////////
-SelectWithRClick = 1;
-DisplayWeapons = 1;
-RotKeySpeedMax = 2.0;
-RotKeySpeedMax_min = 1.0;
-RotKeySpeedMax_max = 4.0;
-RotKeySpeedMin = 1.0;
-RotKeySpeedMin_min = 0.5;
-RotKeySpeedMin_max = 2.0;
-RotAccel = 3.0;
-FollowOnAtk = 0;
-AtkOnSelect = 0;
-ZCPacsPrim = "gen_bt_col_ext.pacs_prim";
-
-/////////////////
-// PREFERENCES //
-/////////////////
-FPV = 0; // FPV(First Person View) : default is false (Third Person View).
-CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View).
-CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View).
-CameraDistStep = 1.0;
-CameraDistMin = 1.0;
-CameraDistMax = 25.0;
-CameraAccel = 5.0;
-CameraSpeedMin = 2.0;
-CameraSpeedMax = 100.0;
-CameraResetSpeed = 10.0; // Speed in radian/s
-
-//////////////////
-// SOUND CONFIG //
-//////////////////
-SoundForceSoftwareBuffer= 1;
-SoundOn = 1;
-UseEax = 0;
-
-MaxTrack = 32;
-MaxTrack_min = 4;
-MaxTrack_max = 32;
-MaxTrack_step = 4;
-
-// This is the volume for "InGame" sound FXs
-SoundSFXVolume = 1.0;
-SoundSFXVolume_min = 0.0;
-SoundSFXVolume_max = 1.0;
-SoundSFXVolume_step = 0.001;
-
-// This is volume for "InGame" music. Does not affect the MP3 player
-SoundGameMusicVolume = 0.5;
-SoundGameMusicVolume_min = 0.0;
-SoundGameMusicVolume_max = 1.0;
-SoundGameMusicVolume_step = 0.001;
-
-// MISC
-PreDataPath = { "user", "patch", "data", "examples" };
-NeedComputeVS = 0;
-
-NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" };
-NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" };
-NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" };
-
-// Big screen shot
-ScreenShotWidth = 0;
-ScreenShotHeight = 0;
-ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots)
-
-// Read : "ID", "R G B A MODE [FX]"
-SystemInfoColors =
-{
-// OLD STUFF Here for compatibility
-"RG", "0 0 0 255 normal", // Black to see when there is an error
-"BC", "0 0 0 255 normal", // Black to see when there is an error
-"JA", "0 0 0 255 normal", // Black to see when there is an error
-"BL", "0 0 0 255 normal", // Black to see when there is an error
-"VE", "0 0 0 255 normal", // Black to see when there is an error
-"VI", "0 0 0 255 normal", // Black to see when there is an error
-
-// NEW System Info Categories
-"SYS", "255 255 255 255 normal", // Default system messages
-"BC", "255 255 255 255 centeraround", // Broadcast messages
-"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged
-"XP", "255 255 64 255 over", // XP Gain
-"SP", "255 255 64 255 over", // SP Gain
-"TTL", "255 255 64 255 over", // Title
-"TSK", "255 255 255 255 over", // Task
-"ZON", "255 255 255 255 center", // Zone
-"DG", "255 0 0 255 normal", // Damage to me
-"DMG", "255 0 0 255 normal", // Damage to me
-"DGP", "200 0 0 255 normal", // Damage to me from player
-"DGM", "255 128 64 255 normal", // Damage from me
-"MIS", "150 150 150 255 normal", // The opponent misses
-"MISM", "255 255 255 255 normal", // I miss
-"ITM", "0 200 0 255 over", // Item
-"ITMO", "170 170 255 255 overonly", // Item other in group
-"ITMF", "220 0 220 255 over", // Item failed
-"SPL", "50 50 250 255 normal", // Spell to me
-"SPLM", "50 150 250 255 normal", // Spell from me
-"EMT", "255 150 150 255 normal", // Emote
-"MTD", "255 255 0 255 over", // Message Of The Day
-"FORLD","64 255 64 255 overonly", // Forage Locate Deposit
-"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition
-"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.)
-"PVPTM","255 120 60 255 overonly", // PVP timer
-"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished
-"AMB", "255 255 64 255 center", // Ambiance
-"ISE", "192 208 255 255 normal", // Item special effect
-"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text)
-"OSM", "128 160 255 255 center", // Outpost state message
-"AROUND","255 255 0 255 around", // Only in around channel
-"R2_INVITE","0 255 0 255 around", // Ring invitation
-};
-
-PrintfCommands = {
- "52", "15", "55 55 0 255", "28", "uiChapterV", "624",
- "428", "0 0 0 255", "18", "", "624", "378",
- "0 0 0 255", "14", "", "644", "278", "0 0 0 255",
- "18", "", "52", "17", "255 255 255 255", "28",
- "uiChapterV", "622", "430", "255 255 255 255", "18", "",
- "622", "380", "255 255 255 255", "14", "", "642",
- "280", "255 255 255 255", "18", ""
-};
-
-PrintfCommandsFreeTrial = {
- "52", "15", "55 55 0 255", "28", "uiChapterV", "624",
- "428", "0 0 0 255", "18", "", "624", "378",
- "0 0 0 255", "14", "", "644", "278", "0 0 0 255",
- "18", "", "52", "17", "255 255 255 255", "28",
- "uiChapterV", "622", "430", "255 255 255 255", "18", "",
- "622", "380", "255 255 255 255", "14", "", "642",
- "280", "255 255 255 255", "18", ""
-};
-
-DisplayMissingAnimFile = 0;
-
-LoadingStringCount = 54;
-
-
-// Some R2 parameters ...
-
-R2Mode = 1;
-R2EDEnabled = 1;
-R2EDExtendedDebug = 0;
-R2EDLightPalette = 0;
-R2ClientGw = "r2linux01";
-LoadLuaDebugger = 0;
-CheckR2ScenarioMD5 = 1;
-LevelDesignEnabled = 0;
-
-DmCameraDistMax = 25;
-DmRun = 20;
-DmWalk = 6;
-
-R2EDReloadFiles = {
- "r2ed.xml",
- "r2_basic_bricks.lua",
- "r2_components.lua",
- "r2_core.lua",
- "r2_features_default.lua",
- "r2_features_fauna.lua",
- "r2_features_npc_groups.lua",
- "r2_palette.lua",
- "r2_scenario.lua",
- "r2_ui.lua"
-};
-
-XMLInterfaceFiles = {
- "config.xml",
- "widgets.xml",
- "webig_widgets.xml",
- "player.xml",
- "inventory.xml",
- "interaction.xml",
- "phrase.xml",
- "harvest.xml",
- "macros.xml",
- "info_player.xml",
- "outpost.xml",
- "guild.xml",
- "taskbar.xml",
- "game_config.xml",
- "game_context_menu.xml",
- "player_trade.xml",
- "bot_chat_v4.xml",
- "compass.xml",
- "map.xml",
- "hierarchy.xml",
- "reset.xml",
- "actions.xml",
- "help.xml",
- "encyclopedia.xml",
- "commands.xml",
- "commands2.xml",
- "ring_access_point_filter.xml",
- "ring_window.xml",
- "bg_downloader.xml"
-};
-
-XMLR2EDInterfaceFiles =
-{
- "r2ed.xml",
- "r2_triggers.xml",
- "r2_logic_entities.xml",
- "r2ed_acts.xml",
- "r2ed_scenario.xml",
- "r2ed_connect.xml"
-};
-
-FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth
-
-
-// Hardware cursor textures
-// These will be extracted from the corresponding packed ui .tga files when they are loaded
-// *
-// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet
-HardwareCursors =
-{
- "curs_can_pan.tga",
- "curs_can_pan_dup.tga",
- "curs_create.tga",
- "curs_create_multi.tga",
- "curs_create_vertex_invalid.tga",
- "curs_default.tga",
- "curs_dup.tga",
- "curs_L.tga",
- "curs_M.tga",
- "curs_pan.tga",
- "curs_pan_dup.tga",
- "curs_pick.tga",
- "curs_pick_dup.tga",
- "curs_R.tga",
- "curs_resize_BL_TR.tga",
- "curs_resize_BR_TL.tga",
- "curs_resize_LR.tga",
- "curs_resize_TB.tga",
- "curs_rotate.tga",
- "curs_scale.tga",
- "curs_stop.tga",
- "text_cursor.tga",
- "r2_hand_can_pan.tga",
- "r2_hand_pan.tga",
- "r2ed_tool_can_pick.tga",
- "r2ed_tool_can_rotate.tga",
- "r2ed_tool_pick.tga",
- "r2ed_tool_rotate.tga",
- "r2ed_tool_rotating.tga"
-};
-
-Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file.
-Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file.
-TeleportKami_BG = "new_teleport_kami_bg.tga";
-TeleportKaravan_BG = "new_teleport_caravan_bg.tga";
-Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file.
-ResurectKami_BG = "new_resurect_kami_bg.tga";
-ResurectKaravan_BG = "new_resurect_caravane_bg.tga";
-End_BG = "end_bg.tga"; // Default name for the last background file.
-
-ScenarioSavePath = "./my_scenarios/";
-
-// list ofpredefined keyset
-// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id
-// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id
-// 'bi.' stands for built-in
-// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name
-BuiltInKeySets =
-{
- "", // default ryzom keyboard layout
- "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian)
- "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian)
- "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring)
-};
-
-// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other"
-ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"};
-
-ScenarioLanguages = {"fr","de","en","other_lang"};
-
-// Map each language to a forum help page
-HelpPages =
-{
- "fr=http://forums.ryzom.com/forum/showthread.php?t=29130",
- "en=http://forums.ryzom.com/forum/showthread.php?t=29129",
- "wk=http://forums.ryzom.com/forum/showthread.php?t=29129",
- "de=http://forums.ryzom.com/forum/showthread.php?t=29131",
- "es=http://forums.ryzom.com/forum/showthread.php?t=29129",
- "ru=http://forums.ryzom.com/forum/showthread.php?t=29129"
-};
-
-WebIgMainDomain = "app.ryzom.com";
-WebIgTrustedDomains = {
- "api.ryzom.com", "app.ryzom.com"
-};
-PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload";
-
-SelectedSlot = 0;
-
-BuildName = "RELEASE_HEAD";
+//////////////////////////
+/// CLIENT CONFIG FILE ///
+//////////////////////////
+//////////////////////////
+
+//////////////////////////
+
+// If you set this variable to 1, your client.cfg will be overwritten when you quit the client.
+// You will loose all the comments and identation in this file.
+SaveConfig = 1;
+
+///////////////////
+// WINDOW CONFIG //
+///////////////////
+
+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 = 0;
+Width = 0;
+Height = 0;
+PositionX = 0;
+PositionY = 0;
+Frequency = 0;
+Depth = 32;
+Sleep = -1;
+ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time
+Contrast = 0.0; // -1.0 ~ 1.0
+Luminosity = 0.0; // -1.0 ~ 1.0
+Gamma = 0.0; // -1.0 ~ 1.0
+Contrast_min = -1.0;
+Luminosity_min = -1.0;
+Gamma_min = -1.0;
+Contrast_max = 1.0;
+Luminosity_max = 1.0;
+Gamma_max = 1.0;
+
+
+/////////////
+// NETWORK //
+/////////////
+
+Application = { "Lirria", "./client_ryzom_r.exe", "./" };
+BackgroundDownloader = 0;
+PatchWanted = 1;
+PatchUrl = "http://lirria.khaganat.net:43435";
+RingReleaseNotePath = "http://lirria.khaganat.net/patch/index.php";
+StartupHost = "lirria.khaganat.net:40916";
+StartupPage = "/login/r2_login.php";
+InstallStatsUrl = "http://lirria.khaganat.net:50000/stats/stats.php";
+
+CreateAccountURL = "http://lirria.khaganat.net/ams/?page=register";
+EditAccountURL = "http://lirria.khaganat.net/";
+ForgetPwdURL = "http://lirria.khaganat.net/ams/index.php?page=forgot_password";
+//FreeTrialURL = "http://lirria.khaganat.net/";
+LoginSupportURL = "http://lirria.khaganat.net/";
+ConditionsTermsURL = "khaganat.net/wikhan/fr:charte";
+
+
+
+////////////////
+// INTERFACES //
+////////////////
+
+// the language to use as in ISO 639-2
+LanguageCode = "en"; // english
+
+XMLInputFile = "input_config_v3.xml";
+
+XMLLoginInterfaceFiles = {
+ "login_config.xml",
+ "login_widgets.xml",
+ "login_main.xml",
+ "login_keys.xml",
+};
+
+XMLOutGameInterfaceFiles = {
+ "out_v2_config.xml",
+ "out_v2_widgets.xml",
+ "out_v2_connect.xml",
+ "out_v2_intro.xml",
+ "out_v2_select.xml",
+ "out_v2_appear.xml",
+ "out_v2_location.xml",
+ "out_v2_crash.xml",
+ "out_v2_hierarchy.xml",
+ "out_v2_keys.xml",
+};
+
+// The ligo primitive class file
+LigoPrimitiveClass = "world_editor_classes.xml";
+
+VerboseLog = 1;
+
+///////////
+// MOUSE //
+///////////
+HardwareCursor = 1;
+
+CursorSpeed = 1.0; // In pixels per mickey
+CursorSpeed_min = 0.5;
+CursorSpeed_max = 2.0;
+
+CursorAcceleration = 40; // Threshold in mickey
+CursorAcceleration_min = 20;
+CursorAcceleration_max = 80;
+
+FreeLookSpeed = 0.004; // In radian per mickey
+FreeLookSpeed_min = 0.0001;
+FreeLookSpeed_max = 0.01;
+
+FreeLookAcceleration = 40; // Threshold in mickey
+FreeLookAcceleration_min = 20;
+FreeLookAcceleration_max = 80;
+
+FreeLookInverted = 0;
+AutomaticCamera = 0;
+DblClickMode = 1;
+AutoEquipTool = 1;
+
+///////////////////
+// RENDER CONFIG //
+///////////////////
+
+// NB: thoses variables configure also the InGameConfigurator:
+// _min and _max define the bounds
+// _step defines the step (NB: take care of _min and _max!!)
+// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one
+
+
+// *** LANDSCAPE
+LandscapeTileNear = 50.000000;
+LandscapeTileNear_min = 20.000000;
+LandscapeTileNear_max = 100.000000;
+LandscapeTileNear_step = 10.0;
+LandscapeTileNear_ps0 = 20.0;
+LandscapeTileNear_ps1 = 40.0;
+LandscapeTileNear_ps2 = 50.0;
+LandscapeTileNear_ps3 = 80.0;
+
+// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible
+LandscapeThreshold = 1000.0;
+LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold
+LandscapeThreshold_max = 2000.0; // High quality => 0.0005 threshold
+LandscapeThreshold_step = 100.0;
+LandscapeThreshold_ps0 = 100.0;
+LandscapeThreshold_ps1 = 500.0;
+LandscapeThreshold_ps2 = 1000.0;
+LandscapeThreshold_ps3 = 2000.0;
+
+Vision = 500.000000;
+Vision_min = 200.000000;
+Vision_max = 800.000000;
+Vision_step = 100.000000;
+Vision_ps0 = 200.0;
+Vision_ps1 = 400.0;
+Vision_ps2 = 500.0;
+Vision_ps3 = 800.0;
+
+MicroVeget = 1; // Enable/Disable MicroVeget.
+MicroVeget_ps0 = 0;
+MicroVeget_ps1 = 1;
+MicroVeget_ps2 = 1;
+MicroVeget_ps3 = 1;
+
+MicroVegetDensity = 80.0;
+MicroVegetDensity_min = 10.0;
+MicroVegetDensity_max = 100.0;
+MicroVegetDensity_step = 10.0;
+MicroVegetDensity_ps0 = 10.0; // not used since disabled!
+MicroVegetDensity_ps1 = 30.0;
+MicroVegetDensity_ps2 = 80.0;
+MicroVegetDensity_ps3 = 100.0;
+
+
+// *** FX
+FxNbMaxPoly = 20000;
+FxNbMaxPoly_min = 2000;
+FxNbMaxPoly_max = 50000;
+FxNbMaxPoly_step= 2000;
+FxNbMaxPoly_ps0 = 2000;
+FxNbMaxPoly_ps1 = 10000;
+FxNbMaxPoly_ps2 = 20000;
+FxNbMaxPoly_ps3 = 50000;
+
+Cloud = 1;
+Cloud_ps0 = 0 ;
+Cloud_ps1 = 1 ;
+Cloud_ps2 = 1 ;
+Cloud_ps3 = 1 ;
+
+CloudQuality = 160.0;
+CloudQuality_min = 80.0;
+CloudQuality_max = 320.0;
+CloudQuality_step = 20.0;
+CloudQuality_ps0 = 80.0; // not used since disabled!
+CloudQuality_ps1 = 80.0;
+CloudQuality_ps2 = 160.0;
+CloudQuality_ps3 = 320.0;
+
+CloudUpdate = 1;
+CloudUpdate_min = 1;
+CloudUpdate_max = 8;
+CloudUpdate_step= 1;
+CloudUpdate_ps0 = 1; // not used since disabled!
+CloudUpdate_ps1 = 1;
+CloudUpdate_ps2 = 1;
+CloudUpdate_ps3 = 3;
+
+Shadows = 1;
+Shadows_ps0 = 0;
+Shadows_ps1 = 1;
+Shadows_ps2 = 1;
+Shadows_ps3 = 1;
+
+FXAA = 1;
+FXAA_ps0 = 0;
+FXAA_ps1 = 1;
+FXAA_ps2 = 1;
+FXAA_ps3 = 1;
+
+AnisotropicFilter = 0;
+
+Bloom = 1;
+Bloom_ps0 = 0;
+Bloom_ps1 = 1;
+Bloom_ps2 = 1;
+Bloom_ps3 = 1;
+
+SquareBloom = 1;
+SquareBloom_ps0 = 0;
+SquareBloom_ps1 = 1;
+SquareBloom_ps2 = 1;
+SquareBloom_ps3 = 1;
+
+DensityBloom = 255.0;
+DensityBloom_min = 0.0;
+DensityBloom_max = 255.0;
+DensityBloom_step = 1.0;
+DensityBloom_ps0 = 255.0;
+DensityBloom_ps1 = 255.0;
+DensityBloom_ps2 = 255.0;
+DensityBloom_ps3 = 255.0;
+
+
+// *** CHARACTERS
+SkinNbMaxPoly = 100000;
+SkinNbMaxPoly_min = 5000;
+SkinNbMaxPoly_max = 250000;
+SkinNbMaxPoly_step = 5000;
+SkinNbMaxPoly_ps0 = 10000;
+SkinNbMaxPoly_ps1 = 70000;
+SkinNbMaxPoly_ps2 = 100000;
+SkinNbMaxPoly_ps3 = 200000;
+
+NbMaxSkeletonNotCLod = 125;
+NbMaxSkeletonNotCLod_min = 5;
+NbMaxSkeletonNotCLod_max = 255;
+NbMaxSkeletonNotCLod_step = 5;
+NbMaxSkeletonNotCLod_ps0 = 10;
+NbMaxSkeletonNotCLod_ps1 = 50;
+NbMaxSkeletonNotCLod_ps2 = 125;
+NbMaxSkeletonNotCLod_ps3 = 255;
+
+CharacterFarClip = 200.0;
+CharacterFarClip_min = 50.0;
+CharacterFarClip_max = 500.0;
+CharacterFarClip_step = 10.0;
+CharacterFarClip_ps0 = 50.0;
+CharacterFarClip_ps1 = 100.0;
+CharacterFarClip_ps2 = 200.0;
+CharacterFarClip_ps3 = 500.0;
+
+EnableRacialAnimation = 1;
+
+// *** MISC
+// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance
+ScreenAspectRatio = 0.0;
+ForceDXTC = 1; // Enable/Disable DXTC.
+DivideTextureSizeBy2= 0; // Divide texture size
+DisableVtxProgram = 0; // Disable Hardware Vertex Program.
+DisableVtxAGP = 0; // Disable Hardware Vertex AGP.
+DisableTextureShdr = 0; // Disable Hardware Texture Shader.
+HDEntityTexture = 1;
+HDTextureInstalled = 1;
+WaitVBL = 0; // 0 or 1 to wait Vertical Sync.
+
+//////////////////
+// GAME OPTIONS //
+//////////////////
+SelectWithRClick = 1;
+DisplayWeapons = 1;
+RotKeySpeedMax = 2.0;
+RotKeySpeedMax_min = 1.0;
+RotKeySpeedMax_max = 4.0;
+RotKeySpeedMin = 1.0;
+RotKeySpeedMin_min = 0.5;
+RotKeySpeedMin_max = 2.0;
+RotAccel = 3.0;
+FollowOnAtk = 0;
+AtkOnSelect = 0;
+ZCPacsPrim = "gen_bt_col_ext.pacs_prim";
+
+/////////////////
+// PREFERENCES //
+/////////////////
+FPV = 0; // FPV(First Person View) : default is false (Third Person View).
+CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View).
+CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View).
+CameraDistStep = 1.0;
+CameraDistMin = 1.0;
+CameraDistMax = 25.0;
+CameraAccel = 5.0;
+CameraSpeedMin = 2.0;
+CameraSpeedMax = 100.0;
+CameraResetSpeed = 10.0; // Speed in radian/s
+
+//////////////////
+// SOUND CONFIG //
+//////////////////
+SoundForceSoftwareBuffer= 1;
+SoundOn = 1;
+UseEax = 0;
+
+MaxTrack = 32;
+MaxTrack_min = 4;
+MaxTrack_max = 32;
+MaxTrack_step = 4;
+
+// This is the volume for "InGame" sound FXs
+SoundSFXVolume = 1.0;
+SoundSFXVolume_min = 0.0;
+SoundSFXVolume_max = 1.0;
+SoundSFXVolume_step = 0.001;
+
+// This is volume for "InGame" music. Does not affect the MP3 player
+SoundGameMusicVolume = 0.5;
+SoundGameMusicVolume_min = 0.0;
+SoundGameMusicVolume_max = 1.0;
+SoundGameMusicVolume_step = 0.001;
+
+// MISC
+PreDataPath = { "user", "patch", "examples", "data/patch_lirria.bnp", "data/fonts", "data/gamedev.bnp" };
+DataPath = { "data" };
+NeedComputeVS = 0;
+
+NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" };
+NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" };
+NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" };
+
+// Big screen shot
+ScreenShotWidth = 0;
+ScreenShotHeight = 0;
+ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots)
+
+// Read : "ID", "R G B A MODE [FX]"
+SystemInfoColors =
+{
+// OLD STUFF Here for compatibility
+"RG", "0 0 0 255 normal", // Black to see when there is an error
+"BC", "0 0 0 255 normal", // Black to see when there is an error
+"JA", "0 0 0 255 normal", // Black to see when there is an error
+"BL", "0 0 0 255 normal", // Black to see when there is an error
+"VE", "0 0 0 255 normal", // Black to see when there is an error
+"VI", "0 0 0 255 normal", // Black to see when there is an error
+
+// NEW System Info Categories
+"SYS", "255 255 255 255 normal", // Default system messages
+"BC", "255 255 255 255 centeraround", // Broadcast messages
+"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged
+"XP", "255 255 64 255 over", // XP Gain
+"SP", "255 255 64 255 over", // SP Gain
+"TTL", "255 255 64 255 over", // Title
+"TSK", "255 255 255 255 over", // Task
+"ZON", "255 255 255 255 center", // Zone
+"DG", "255 0 0 255 normal", // Damage to me
+"DMG", "255 0 0 255 normal", // Damage to me
+"DGP", "200 0 0 255 normal", // Damage to me from player
+"DGM", "255 128 64 255 normal", // Damage from me
+"MIS", "150 150 150 255 normal", // The opponent misses
+"MISM", "255 255 255 255 normal", // I miss
+"ITM", "0 200 0 255 over", // Item
+"ITMO", "170 170 255 255 overonly", // Item other in group
+"ITMF", "220 0 220 255 over", // Item failed
+"SPL", "50 50 250 255 normal", // Spell to me
+"SPLM", "50 150 250 255 normal", // Spell from me
+"EMT", "255 150 150 255 normal", // Emote
+"MTD", "255 255 0 255 over", // Message Of The Day
+"FORLD","64 255 64 255 overonly", // Forage Locate Deposit
+"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition
+"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.)
+"PVPTM","255 120 60 255 overonly", // PVP timer
+"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished
+"AMB", "255 255 64 255 center", // Ambiance
+"ISE", "192 208 255 255 normal", // Item special effect
+"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text)
+"OSM", "128 160 255 255 center", // Outpost state message
+"AROUND","255 255 0 255 around", // Only in around channel
+"R2_INVITE","0 255 0 255 around", // Ring invitation
+};
+
+PrintfCommands = {
+ "52", "15", "55 55 0 255", "28", "uiEonSymbiose", "624",
+ "428", "0 0 0 255", "18", "", "624", "378",
+ "0 0 0 255", "14", "", "644", "278", "0 0 0 255",
+ "18", "", "52", "17", "255 255 255 255", "28",
+ "uiEonSymbiose", "622", "430", "255 255 255 255", "18", "",
+ "622", "380", "255 255 255 255", "14", "", "642",
+ "280", "255 255 255 255", "18", ""
+};
+
+PrintfCommandsFreeTrial = {
+ "52", "15", "55 55 0 255", "28", "uiEonSymbiose", "624",
+ "428", "0 0 0 255", "18", "", "624", "378",
+ "0 0 0 255", "14", "", "644", "278", "0 0 0 255",
+ "18", "", "52", "17", "255 255 255 255", "28",
+ "uiEonSymbiose", "622", "430", "255 255 255 255", "18", "",
+ "622", "380", "255 255 255 255", "14", "", "642",
+ "280", "255 255 255 255", "18", ""
+};
+
+DisplayMissingAnimFile = 0;
+
+LoadingStringCount = 54;
+
+
+// Some R2 parameters ...
+
+R2Mode = 1;
+R2EDEnabled = 1;
+R2EDExtendedDebug = 0;
+R2EDLightPalette = 0;
+R2ClientGw = "r2linux01";
+LoadLuaDebugger = 0;
+CheckR2ScenarioMD5 = 1;
+LevelDesignEnabled = 0;
+
+DmCameraDistMax = 25;
+DmRun = 20;
+DmWalk = 6;
+
+R2EDReloadFiles = {
+ "r2ed.xml",
+ "r2_basic_bricks.lua",
+ "r2_components.lua",
+ "r2_core.lua",
+ "r2_features_default.lua",
+ "r2_features_fauna.lua",
+ "r2_features_npc_groups.lua",
+ "r2_palette.lua",
+ "r2_scenario.lua",
+ "r2_ui.lua"
+};
+
+XMLInterfaceFiles = {
+ "config.xml",
+ "widgets.xml",
+ "webig_widgets.xml",
+ "player.xml",
+ "inventory.xml",
+ "interaction.xml",
+ "phrase.xml",
+ "harvest.xml",
+ "macros.xml",
+ "info_player.xml",
+ "outpost.xml",
+ "guild.xml",
+ "taskbar.xml",
+ "game_config.xml",
+ "game_context_menu.xml",
+ "player_trade.xml",
+ "bot_chat_v4.xml",
+ "compass.xml",
+ "map.xml",
+ "hierarchy.xml",
+ "reset.xml",
+ "actions.xml",
+ "help.xml",
+ "encyclopedia.xml",
+ "commands.xml",
+ "commands2.xml",
+ "ring_access_point_filter.xml",
+ "ring_window.xml",
+ "bg_downloader.xml"
+};
+
+XMLR2EDInterfaceFiles =
+{
+ "r2ed.xml",
+ "r2_triggers.xml",
+ "r2_logic_entities.xml",
+ "r2ed_acts.xml",
+ "r2ed_scenario.xml",
+ "r2ed_connect.xml"
+};
+
+FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth
+
+
+// Hardware cursor textures
+// These will be extracted from the corresponding packed ui .tga files when they are loaded
+// *
+// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet
+HardwareCursors =
+{
+ "curs_can_pan.tga",
+ "curs_can_pan_dup.tga",
+ "curs_create.tga",
+ "curs_create_multi.tga",
+ "curs_create_vertex_invalid.tga",
+ "curs_default.tga",
+ "curs_dup.tga",
+ "curs_L.tga",
+ "curs_M.tga",
+ "curs_pan.tga",
+ "curs_pan_dup.tga",
+ "curs_pick.tga",
+ "curs_pick_dup.tga",
+ "curs_R.tga",
+ "curs_resize_BL_TR.tga",
+ "curs_resize_BR_TL.tga",
+ "curs_resize_LR.tga",
+ "curs_resize_TB.tga",
+ "curs_rotate.tga",
+ "curs_scale.tga",
+ "curs_stop.tga",
+ "text_cursor.tga",
+ "r2_hand_can_pan.tga",
+ "r2_hand_pan.tga",
+ "r2ed_tool_can_pick.tga",
+ "r2ed_tool_can_rotate.tga",
+ "r2ed_tool_pick.tga",
+ "r2ed_tool_rotate.tga",
+ "r2ed_tool_rotating.tga"
+};
+
+Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file.
+Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file.
+TeleportKami_BG = "new_teleport_kami_bg.tga";
+TeleportKaravan_BG = "new_teleport_caravan_bg.tga";
+Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file.
+ResurectKami_BG = "new_resurect_kami_bg.tga";
+ResurectKaravan_BG = "new_resurect_caravane_bg.tga";
+End_BG = "end_bg.tga"; // Default name for the last background file.
+
+ScenarioSavePath = "./my_scenarios/";
+
+// list ofpredefined keyset
+// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id
+// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id
+// 'bi.' stands for built-in
+// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name
+BuiltInKeySets =
+{
+ "", // default ryzom keyboard layout
+ "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian)
+ "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian)
+ "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring)
+};
+
+// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other"
+ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"};
+
+ScenarioLanguages = {"fr","de","en","other_lang"};
+
+// Map each language to a forum help page
+HelpPages =
+{
+ "fr=http://www.khaganat.net/forum/index.php/board,31.0.html",
+ "en=http://www.khaganat.net/forum/index.php/board,31.0.html",
+ "wk=http://www.khaganat.net/forum/index.php/board,31.0.html",
+ "de=http://www.khaganat.net/forum/index.php/board,31.0.html",
+ "es=http://www.khaganat.net/forum/index.php/board,31.0.html",
+ "ru=http://www.khaganat.net/forum/index.php/board,31.0.html"
+};
+
+WebIgMainDomain = "app.khaganat.net";
+WebIgTrustedDomains = {
+ "api.khaganat.net", "app.khaganat.net", "lirria.khaganat.net"
+};
+//PatchletUrl = "";
+
+SelectedSlot = 0;
+
+BuildName = "RELEASE_HEAD";
diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml b/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml
index 8696de32a..5fb009adf 100644
--- a/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml
+++ b/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml
@@ -77,70 +77,51 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -166,7 +147,7 @@
-
+
@@ -191,84 +172,150 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -295,239 +342,101 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/hierarchy.xml b/code/ryzom/client/data/gamedev/interfaces_v3/hierarchy.xml
index 737db5c59..9499119ee 100644
--- a/code/ryzom/client/data/gamedev/interfaces_v3/hierarchy.xml
+++ b/code/ryzom/client/data/gamedev/interfaces_v3/hierarchy.xml
@@ -110,15 +110,15 @@
-
-
-
-
+
-
-
+
+
+
-
+
+
+
diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/macros.xml b/code/ryzom/client/data/gamedev/interfaces_v3/macros.xml
index 65d6394d7..bbc7ffade 100644
--- a/code/ryzom/client/data/gamedev/interfaces_v3/macros.xml
+++ b/code/ryzom/client/data/gamedev/interfaces_v3/macros.xml
@@ -207,17 +207,15 @@
-
-
+
+
+
-
-
-
-
-
-
+
+
+
@@ -648,6 +646,7 @@
+
diff --git a/code/ryzom/client/macosx/khanat.icns b/code/ryzom/client/macosx/khanat.icns
new file mode 100644
index 000000000..fafeddeb2
Binary files /dev/null and b/code/ryzom/client/macosx/khanat.icns differ
diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt
index dec6492a8..3189d0baa 100644
--- a/code/ryzom/client/src/CMakeLists.txt
+++ b/code/ryzom/client/src/CMakeLists.txt
@@ -51,11 +51,11 @@ IF(WITH_RYZOM_CLIENT)
# on Mac, create a .App Bundle
if(APPLE)
- SET(MACOSX_BUNDLE_INFO_STRING "Ryzom")
- SET(MACOSX_BUNDLE_ICON_FILE "ryzom.icns")
- SET(MACOSX_BUNDLE_GUI_IDENTIFIER "com.winchgate.Ryzom")
+ SET(MACOSX_BUNDLE_INFO_STRING "Khanat")
+ SET(MACOSX_BUNDLE_ICON_FILE "khanat.icns")
+ SET(MACOSX_BUNDLE_GUI_IDENTIFIER "com.khaganat.khanat")
SET(MACOSX_BUNDLE_LONG_VERSION_STRING ${RYZOM_VERSION})
- SET(MACOSX_BUNDLE_BUNDLE_NAME "Ryzom")
+ SET(MACOSX_BUNDLE_BUNDLE_NAME "Khanat")
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING ${RYZOM_VERSION})
SET(MACOSX_BUNDLE_BUNDLE_VERSION "1.0")
SET(MACOSX_BUNDLE_COPYRIGHT ${COPYRIGHT})
@@ -72,7 +72,7 @@ IF(WITH_RYZOM_CLIENT)
SET_TARGET_PROPERTIES(ryzom_client PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${MAC_RESOURCES_DIR}/Info.plist)
ADD_CUSTOM_COMMAND(TARGET ryzom_client PRE_BUILD COMMAND mkdir -p ${RYZOM_RESOURCES_DIR})
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/PkgInfo ${RYZOM_CONTENTS_DIR})
- ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/ryzom.icns ${RYZOM_RESOURCES_DIR})
+ ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/khanat.icns ${RYZOM_RESOURCES_DIR})
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${CMAKE_SOURCE_DIR}/ryzom/client/client_default.cfg ${RYZOM_RESOURCES_DIR})
# remove any present installscript_osx.vdf before signing
diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp
index 61b30b4c9..a4d43ab9d 100644
--- a/code/ryzom/client/src/client.cpp
+++ b/code/ryzom/client/src/client.cpp
@@ -376,7 +376,7 @@ int main(int argc, char **argv)
// if client_default.cfg is not in current directory, use application default directory
if (!CFile::isExists("client_default.cfg"))
{
- std::string currentPath = CPath::getApplicationDirectory("Ryzom");
+ std::string currentPath = CPath::getApplicationDirectory("Khanat");
if (!CFile::isExists(currentPath)) CFile::createDirectory(currentPath);
diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp
index f958869f5..572e2e620 100644
--- a/code/ryzom/client/src/commands.cpp
+++ b/code/ryzom/client/src/commands.cpp
@@ -145,11 +145,11 @@ static std::vector ShapeAddedByCommand; // list of shapes added with
// Function to release all things allocated for commands.
void releaseCommands()
{
- if(LDPrim)
- {
- delete LDPrim;
- LDPrim = 0;
- }
+ if(LDPrim)
+ {
+ delete LDPrim;
+ LDPrim = 0;
+ }
}
//////////////
@@ -159,181 +159,181 @@ void releaseCommands()
// 'follow' : To Follow the target.
NLMISC_COMMAND(follow, "Follow the target", "")
{
- // switch
- if(UserEntity->follow())
- UserEntity->disableFollow();
- else
- // enable follow, reseting the camera rotation
- UserEntity->enableFollow(true);
- return true;
+ // switch
+ if(UserEntity->follow())
+ UserEntity->disableFollow();
+ else
+ // enable follow, reseting the camera rotation
+ UserEntity->enableFollow(true);
+ return true;
}
NLMISC_COMMAND(where, "Ask information on the position", "")
{
- // Check parameters.
- if(args.size() == 0)
- { // Create the message and send.
- const string msgName = "COMMAND:WHERE";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
- {
- NetMngr.push(out);
- }
- else
- nlwarning("command 'where': unknown message named '%s'", msgName.c_str());
- return true;
+ // Check parameters.
+ if(args.size() == 0)
+ { // Create the message and send.
+ const string msgName = "COMMAND:WHERE";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
+ {
+ NetMngr.push(out);
}
- return false;
+ else
+ nlwarning("command 'where': unknown message named '%s'", msgName.c_str());
+ return true;
+ }
+ return false;
}
NLMISC_COMMAND(who, "Display all players currently in region","[]")
{
- // Check parameters.
- if(args.size() > 1)
- return false;
+ // Check parameters.
+ if(args.size() > 1)
+ return false;
- CBitMemStream out;
- if(!GenericMsgHeaderMngr.pushNameToStream("DEBUG:WHO", out))
- {
- nlwarning("Unknown message name DEBUG:WHO");
- return false;
- }
+ CBitMemStream out;
+ if(!GenericMsgHeaderMngr.pushNameToStream("DEBUG:WHO", out))
+ {
+ nlwarning("Unknown message name DEBUG:WHO");
+ return false;
+ }
- string opt;
- if ( args.size() == 1 )
- {
- opt = args[0];
- }
- out.serial(opt);
- NetMngr.push(out);
- return true;
+ string opt;
+ if ( args.size() == 1 )
+ {
+ opt = args[0];
+ }
+ out.serial(opt);
+ NetMngr.push(out);
+ return true;
}
NLMISC_COMMAND(afk, "Set the player as 'away from keyboard'","[]")
{
- string customText;
- if( args.size() > 0 )
- {
- customText = args[0];
- }
- for(uint i = 1; i < args.size(); ++i )
- {
- customText += " ";
- customText += args[i];
- }
+ string customText;
+ if( args.size() > 0 )
+ {
+ customText = args[0];
+ }
+ for(uint i = 1; i < args.size(); ++i )
+ {
+ customText += " ";
+ customText += args[i];
+ }
- if (UserEntity != NULL)
- UserEntity->setAFK(true,customText);
-/*
- CBitMemStream out;
- if(!GenericMsgHeaderMngr.pushNameToStream("DEBUG:AFK", out))
- {
- nlwarning("Unknown message name DEBUG:AFK");
- return false;
- }
- NetMngr.push(out);
-*/
- return true;
+ if (UserEntity != NULL)
+ UserEntity->setAFK(true,customText);
+ /*
+ CBitMemStream out;
+ if(!GenericMsgHeaderMngr.pushNameToStream("DEBUG:AFK", out))
+ {
+ nlwarning("Unknown message name DEBUG:AFK");
+ return false;
+ }
+ NetMngr.push(out);
+ */
+ return true;
}
bool randomCheckCharset(std::string const& str)
{
- std::string::const_iterator it, itEnd = str.end();
- for (it=str.begin(); it!=itEnd; ++it)
- if (*it<'0' || *it>'9')
- return false;
- return true;
+ std::string::const_iterator it, itEnd = str.end();
+ for (it=str.begin(); it!=itEnd; ++it)
+ if (*it<'0' || *it>'9')
+ return false;
+ return true;
}
// returns true if a<=b
bool randomLexicographicLess(std::string a, std::string b)
{
- // Remove leading zeros
- while (a.length()>1 && a[0]=='0')
- a = a.substr(1);
- while (b.length()>1 && b[0]=='0')
- b = b.substr(1);
- // Longest is the biggest
- if (a.length()>b.length())
- return false;
- if (a.length()1 && a[0]=='0')
+ a = a.substr(1);
+ while (b.length()>1 && b[0]=='0')
+ b = b.substr(1);
+ // Longest is the biggest
+ if (a.length()>b.length())
+ return false;
+ if (a.length()0) return false;
- if (!negative && max<0) return false;
- // Check number is not too big nor too small with a lexicographic compare
- std::string smin = NLMISC::toString(std::max(min,-min));
- std::string smax = NLMISC::toString(std::max(max,-max));
- bool tooSmall = false, tooBig = false;
- if (min>=0 && randomLexicographicLess(sAbsVal, smin))
- tooSmall = true;
- if (min<0 && randomLexicographicLess(smin, sAbsVal))
- tooSmall = true;
- if (max>=0 && randomLexicographicLess(smax, sAbsVal))
- tooBig = true;
- if (max<0 && randomLexicographicLess(sAbsVal, smax))
- tooBig = true;
- if (!tooSmall && !tooBig)
- {
- NLMISC::fromString(str, val);
- return true;
- }
- else
- return false;
+ bool negative = str[0]=='-';
+ std::string sAbsVal = str.substr(negative?1:0);
+ // Check we have only numerical characters
+ if (!randomCheckCharset(sAbsVal))
+ return false;
+ // Check sign
+ if (negative && min>0) return false;
+ if (!negative && max<0) return false;
+ // Check number is not too big nor too small with a lexicographic compare
+ std::string smin = NLMISC::toString(std::max(min,-min));
+ std::string smax = NLMISC::toString(std::max(max,-max));
+ bool tooSmall = false, tooBig = false;
+ if (min>=0 && randomLexicographicLess(sAbsVal, smin))
+ tooSmall = true;
+ if (min<0 && randomLexicographicLess(smin, sAbsVal))
+ tooSmall = true;
+ if (max>=0 && randomLexicographicLess(smax, sAbsVal))
+ tooBig = true;
+ if (max<0 && randomLexicographicLess(sAbsVal, smax))
+ tooBig = true;
+ if (!tooSmall && !tooBig)
+ {
+ NLMISC::fromString(str, val);
+ return true;
+ }
+ else
+ return false;
}
NLMISC_COMMAND(random, "Roll a dice and say the result around","[] ")
{
- // Check parameters.
- if (args.size()<1 || args.size()>2)
- return false;
+ // Check parameters.
+ if (args.size()<1 || args.size()>2)
+ return false;
- sint16 min = 1;
- sint16 max;
- if (!randomFromString(args[0], max))
+ sint16 min = 1;
+ sint16 max;
+ if (!randomFromString(args[0], max))
+ {
+ CInterfaceManager *pIM = CInterfaceManager::getInstance();
+ ucstring msg = CI18N::get("uiRandomBadParameter");
+ strFindReplace(msg, "%s", args[0] );
+ pIM->displaySystemInfo(msg);
+ return false;
+ }
+ if (args.size()==2)
+ {
+ if (!randomFromString(args[1], min))
{
- CInterfaceManager *pIM = CInterfaceManager::getInstance();
- ucstring msg = CI18N::get("uiRandomBadParameter");
- strFindReplace(msg, "%s", args[0] );
- pIM->displaySystemInfo(msg);
- return false;
+ CInterfaceManager *pIM = CInterfaceManager::getInstance();
+ ucstring msg = CI18N::get("uiRandomBadParameter");
+ strFindReplace(msg, "%s", args[0] );
+ pIM->displaySystemInfo(msg);
+ return false;
}
- if (args.size()==2)
- {
- if (!randomFromString(args[1], min))
- {
- CInterfaceManager *pIM = CInterfaceManager::getInstance();
- ucstring msg = CI18N::get("uiRandomBadParameter");
- strFindReplace(msg, "%s", args[0] );
- pIM->displaySystemInfo(msg);
- return false;
- }
- }
- if (min>max)
- std::swap(min, max);
+ }
+ if (min>max)
+ std::swap(min, max);
- if (UserEntity != NULL)
- UserEntity->rollDice(min, max);
+ if (UserEntity != NULL)
+ UserEntity->rollDice(min, max);
- return true;
+ return true;
}
//-----------------------------------------------
@@ -341,59 +341,59 @@ NLMISC_COMMAND(random, "Roll a dice and say the result around","[] ")
//-----------------------------------------------
NLMISC_COMMAND(dumpShapePos, "Dump Last Added Shape Pos.", "")
{
- #if FINAL_VERSION
- if (!hasPrivilegeDEV() &&
- !hasPrivilegeSGM() &&
- !hasPrivilegeGM() &&
- !hasPrivilegeVG() &&
- !hasPrivilegeSG() &&
- !hasPrivilegeG() &&
- !hasPrivilegeEM() &&
- !hasPrivilegeEG())
- return true;
- #endif // FINAL_VERSION
+#if FINAL_VERSION
+ if (!hasPrivilegeDEV() &&
+ !hasPrivilegeSGM() &&
+ !hasPrivilegeGM() &&
+ !hasPrivilegeVG() &&
+ !hasPrivilegeSG() &&
+ !hasPrivilegeG() &&
+ !hasPrivilegeEM() &&
+ !hasPrivilegeEG())
+ return true;
+#endif // FINAL_VERSION
- if (ShapeAddedByCommand.empty())
- {
- nlwarning("No shape created yet");
- return false;
- }
+ if (ShapeAddedByCommand.empty())
+ {
+ nlwarning("No shape created yet");
+ return false;
+ }
- CInterfaceManager *IM = CInterfaceManager::getInstance();
- CVector pos = ShapeAddedByCommand.back().getPos();
- IM->displaySystemInfo(ucstring(toString("Shape Pos = %f, %f, %f", pos.x, pos.y, pos.z)));
- return true;
+ CInterfaceManager *IM = CInterfaceManager::getInstance();
+ CVector pos = ShapeAddedByCommand.back().getPos();
+ IM->displaySystemInfo(ucstring(toString("Shape Pos = %f, %f, %f", pos.x, pos.y, pos.z)));
+ return true;
}
//-----------------------------------------------
// 'clearShape' : Remove all shapes added with the 'shape' command
//-----------------------------------------------
NLMISC_COMMAND(clearShape, "Remove all shapes added with the 'shape' command.", "")
{
- #if FINAL_VERSION
- /*if (!hasPrivilegeDEV() &&
- !hasPrivilegeSGM() &&
- !hasPrivilegeGM() &&
- !hasPrivilegeVG() &&
- !hasPrivilegeSG() &&
- !hasPrivilegeG() &&
- !hasPrivilegeEM() &&
- !hasPrivilegeEG())
- return true;*/
- #endif // FINAL_VERSION
+#if FINAL_VERSION
+ /*if (!hasPrivilegeDEV() &&
+ !hasPrivilegeSGM() &&
+ !hasPrivilegeGM() &&
+ !hasPrivilegeVG() &&
+ !hasPrivilegeSG() &&
+ !hasPrivilegeG() &&
+ !hasPrivilegeEM() &&
+ !hasPrivilegeEG())
+ return true;*/
+#endif // FINAL_VERSION
- if (ShapeAddedByCommand.empty())
- {
- nlwarning("No shape created yet");
- return false;
- }
+ if (ShapeAddedByCommand.empty())
+ {
+ nlwarning("No shape created yet");
+ return false;
+ }
- if (!Scene) return false;
- for(uint k = 0; k < ShapeAddedByCommand.size(); ++k)
- {
- Scene->deleteInstance(ShapeAddedByCommand[k]);
- }
- ShapeAddedByCommand.clear();
- return true;
+ if (!Scene) return false;
+ for(uint k = 0; k < ShapeAddedByCommand.size(); ++k)
+ {
+ Scene->deleteInstance(ShapeAddedByCommand[k]);
+ }
+ ShapeAddedByCommand.clear();
+ return true;
}
//-----------------------------------------------------
@@ -401,43 +401,43 @@ NLMISC_COMMAND(clearShape, "Remove all shapes added with the 'shape' command.",
//-----------------------------------------------------
NLMISC_COMMAND(setShapeX, "Set X position for last created shape.", "")
{
- #if FINAL_VERSION
- /*if (!hasPrivilegeDEV() &&
- !hasPrivilegeSGM() &&
- !hasPrivilegeGM() &&
- !hasPrivilegeVG() &&
- !hasPrivilegeSG() &&
- !hasPrivilegeG() &&
- !hasPrivilegeEM() &&
- !hasPrivilegeEG())
- return true;*/
- #endif // FINAL_VERSION
+#if FINAL_VERSION
+ /*if (!hasPrivilegeDEV() &&
+ !hasPrivilegeSGM() &&
+ !hasPrivilegeGM() &&
+ !hasPrivilegeVG() &&
+ !hasPrivilegeSG() &&
+ !hasPrivilegeG() &&
+ !hasPrivilegeEM() &&
+ !hasPrivilegeEG())
+ return true;*/
+#endif // FINAL_VERSION
- if (args.size() != 1) return false;
- if (ShapeAddedByCommand.empty())
- {
- nlwarning("No shape created yet");
- return false;
- }
- float coord;
- bool valid_coord;
- if (args[0][0] == '+')
- valid_coord = fromString(args[0].substr(1), coord);
- else
- valid_coord = fromString(args[0], coord);
+ if (args.size() != 1) return false;
+ if (ShapeAddedByCommand.empty())
+ {
+ nlwarning("No shape created yet");
+ return false;
+ }
+ float coord;
+ bool valid_coord;
+ if (args[0][0] == '+')
+ valid_coord = fromString(args[0].substr(1), coord);
+ else
+ valid_coord = fromString(args[0], coord);
- if (!valid_coord)
- {
- nlwarning("Can't get position");
- return false;
- }
- CVector pos = ShapeAddedByCommand.back().getPos();
- if (args[0][0] == '+')
- pos.x += coord;
- else
- pos.x = coord;
- ShapeAddedByCommand.back().setPos(pos);
- return true;
+ if (!valid_coord)
+ {
+ nlwarning("Can't get position");
+ return false;
+ }
+ CVector pos = ShapeAddedByCommand.back().getPos();
+ if (args[0][0] == '+')
+ pos.x += coord;
+ else
+ pos.x = coord;
+ ShapeAddedByCommand.back().setPos(pos);
+ return true;
}
//-----------------------------------------------------
@@ -445,43 +445,43 @@ NLMISC_COMMAND(setShapeX, "Set X position for last created shape.", "")
{
- #if FINAL_VERSION
- /*if (!hasPrivilegeDEV() &&
- !hasPrivilegeSGM() &&
- !hasPrivilegeGM() &&
- !hasPrivilegeVG() &&
- !hasPrivilegeSG() &&
- !hasPrivilegeG() &&
- !hasPrivilegeEM() &&
- !hasPrivilegeEG())
- return true;*/
- #endif // FINAL_VERSION
+#if FINAL_VERSION
+ /*if (!hasPrivilegeDEV() &&
+ !hasPrivilegeSGM() &&
+ !hasPrivilegeGM() &&
+ !hasPrivilegeVG() &&
+ !hasPrivilegeSG() &&
+ !hasPrivilegeG() &&
+ !hasPrivilegeEM() &&
+ !hasPrivilegeEG())
+ return true;*/
+#endif // FINAL_VERSION
- if (args.size() != 1) return false;
- if (ShapeAddedByCommand.empty())
- {
- nlwarning("No shape created yet");
- return false;
- }
- float coord;
- bool valid_coord;
- if (args[0][0] == '+')
- valid_coord = fromString(args[0].substr(1), coord);
- else
- valid_coord = fromString(args[0], coord);
+ if (args.size() != 1) return false;
+ if (ShapeAddedByCommand.empty())
+ {
+ nlwarning("No shape created yet");
+ return false;
+ }
+ float coord;
+ bool valid_coord;
+ if (args[0][0] == '+')
+ valid_coord = fromString(args[0].substr(1), coord);
+ else
+ valid_coord = fromString(args[0], coord);
- if (!valid_coord)
- {
- nlwarning("Can't get position");
- return false;
- }
- CVector pos = ShapeAddedByCommand.back().getPos();
- if (args[0][0] == '+')
- pos.y += coord;
- else
- pos.y = coord;
- ShapeAddedByCommand.back().setPos(pos);
- return true;
+ if (!valid_coord)
+ {
+ nlwarning("Can't get position");
+ return false;
+ }
+ CVector pos = ShapeAddedByCommand.back().getPos();
+ if (args[0][0] == '+')
+ pos.y += coord;
+ else
+ pos.y = coord;
+ ShapeAddedByCommand.back().setPos(pos);
+ return true;
}
//-----------------------------------------------------
@@ -489,43 +489,43 @@ NLMISC_COMMAND(setShapeY, "Set Y position for last created shape.", "")
{
- #if FINAL_VERSION
- /*if (!hasPrivilegeDEV() &&
- !hasPrivilegeSGM() &&
- !hasPrivilegeGM() &&
- !hasPrivilegeVG() &&
- !hasPrivilegeSG() &&
- !hasPrivilegeG() &&
- !hasPrivilegeEM() &&
- !hasPrivilegeEG())
- return true;*/
- #endif // FINAL_VERSION
+#if FINAL_VERSION
+ /*if (!hasPrivilegeDEV() &&
+ !hasPrivilegeSGM() &&
+ !hasPrivilegeGM() &&
+ !hasPrivilegeVG() &&
+ !hasPrivilegeSG() &&
+ !hasPrivilegeG() &&
+ !hasPrivilegeEM() &&
+ !hasPrivilegeEG())
+ return true;*/
+#endif // FINAL_VERSION
- if (args.size() != 1) return false;
- if (ShapeAddedByCommand.empty())
- {
- nlwarning("No shape created yet");
- return false;
- }
- float coord;
- bool valid_coord;
- if (args[0][0] == '+')
- valid_coord = fromString(args[0].substr(1), coord);
- else
- valid_coord = fromString(args[0], coord);
+ if (args.size() != 1) return false;
+ if (ShapeAddedByCommand.empty())
+ {
+ nlwarning("No shape created yet");
+ return false;
+ }
+ float coord;
+ bool valid_coord;
+ if (args[0][0] == '+')
+ valid_coord = fromString(args[0].substr(1), coord);
+ else
+ valid_coord = fromString(args[0], coord);
- if (!valid_coord)
- {
- nlwarning("Can't get position");
- return false;
- }
- CVector pos = ShapeAddedByCommand.back().getPos();
- if (args[0][0] == '+')
- pos.z += coord;
- else
- pos.z = coord;
- ShapeAddedByCommand.back().setPos(pos);
- return true;
+ if (!valid_coord)
+ {
+ nlwarning("Can't get position");
+ return false;
+ }
+ CVector pos = ShapeAddedByCommand.back().getPos();
+ if (args[0][0] == '+')
+ pos.z += coord;
+ else
+ pos.z = coord;
+ ShapeAddedByCommand.back().setPos(pos);
+ return true;
}
@@ -534,41 +534,41 @@ NLMISC_COMMAND(setShapeZ, "Set Z position for last created shape.", "")
{
- #if FINAL_VERSION
- /*if (!hasPrivilegeDEV() &&
- !hasPrivilegeSGM() &&
- !hasPrivilegeGM() &&
- !hasPrivilegeVG() &&
- !hasPrivilegeSG() &&
- !hasPrivilegeG() &&
- !hasPrivilegeEM() &&
- !hasPrivilegeEG())
- return true;*/
- #endif // FINAL_VERSION
+#if FINAL_VERSION
+ /*if (!hasPrivilegeDEV() &&
+ !hasPrivilegeSGM() &&
+ !hasPrivilegeGM() &&
+ !hasPrivilegeVG() &&
+ !hasPrivilegeSG() &&
+ !hasPrivilegeG() &&
+ !hasPrivilegeEM() &&
+ !hasPrivilegeEG())
+ return true;*/
+#endif // FINAL_VERSION
- if (args.size() != 1) return false;
- if (ShapeAddedByCommand.empty())
- {
- nlwarning("No shape created yet");
- return false;
- }
- float angle;
- if (!fromString(args[0], angle))
- {
- nlwarning("Can't get angle");
- return false;
- }
+ if (args.size() != 1) return false;
+ if (ShapeAddedByCommand.empty())
+ {
+ nlwarning("No shape created yet");
+ return false;
+ }
+ float angle;
+ if (!fromString(args[0], angle))
+ {
+ nlwarning("Can't get angle");
+ return false;
+ }
- CMatrix dir;
- dir.identity();
- CVector vangle = CVector(sin(angle), cos(angle), 0.f);
- CVector vi = vangle^CVector(0.f, 0.f, 1.f);
- CVector vk = vi^vangle;
- dir.setRot(vi, vangle, vk, true);
- // Set Orientation : User Direction should be normalized.
- ShapeAddedByCommand.back().setRotQuat(dir.getRot());
+ CMatrix dir;
+ dir.identity();
+ CVector vangle = CVector(sin(angle), cos(angle), 0.f);
+ CVector vi = vangle^CVector(0.f, 0.f, 1.f);
+ CVector vk = vi^vangle;
+ dir.setRot(vi, vangle, vk, true);
+ // Set Orientation : User Direction should be normalized.
+ ShapeAddedByCommand.back().setRotQuat(dir.getRot());
- return true;
+ return true;
}
@@ -577,156 +577,156 @@ NLMISC_COMMAND(setShapeDir, "Set direction angle for last created shape.", "")
{
- #if FINAL_VERSION
-/* if (!hasPrivilegeDEV() &&
- !hasPrivilegeSGM() &&
- !hasPrivilegeGM() &&
- !hasPrivilegeVG() &&
- !hasPrivilegeSG() &&
- !hasPrivilegeG() &&
- !hasPrivilegeEM() &&
- !hasPrivilegeEG())
- return true;*/
- #endif // FINAL_VERSION
+#if FINAL_VERSION
+ /* if (!hasPrivilegeDEV() &&
+ !hasPrivilegeSGM() &&
+ !hasPrivilegeGM() &&
+ !hasPrivilegeVG() &&
+ !hasPrivilegeSG() &&
+ !hasPrivilegeG() &&
+ !hasPrivilegeEM() &&
+ !hasPrivilegeEG())
+ return true;*/
+#endif // FINAL_VERSION
- if(args.size() < 1)
+ if(args.size() < 1)
+ {
+ nlwarning("Command 'shape': need at least 1 parameter, try '/help shape' for more details.");
+ return false;
+ }
+ if (!Scene)
+ {
+ nlwarning("No scene available");
+ return false;
+ }
+ UInstance instance = Scene->createInstance(args[0]);
+ if(!instance.empty())
+ {
+ ShapeAddedByCommand.push_back(instance);
+ // Set the position
+ instance.setPos(UserEntity->pos());
+ instance.setClusterSystem(UserEntity->getClusterSystem()); // for simplicity, assume it is in the same
+ // cluster system than the user
+ // Compute the direction Matrix
+ CMatrix dir;
+ dir.identity();
+ CVector vi = UserEntity->dir()^CVector(0.f, 0.f, 1.f);
+ CVector vk = vi^UserEntity->dir();
+ dir.setRot(vi, UserEntity->dir(), vk, true);
+ // Set Orientation : User Direction should be normalized.
+ instance.setRotQuat(dir.getRot());
+ // if the shape is a particle system, additionnal parameters are user params
+ UParticleSystemInstance psi;
+ psi.cast (instance);
+ if (!psi.empty())
{
- nlwarning("Command 'shape': need at least 1 parameter, try '/help shape' for more details.");
- return false;
- }
- if (!Scene)
- {
- nlwarning("No scene available");
- return false;
- }
- UInstance instance = Scene->createInstance(args[0]);
- if(!instance.empty())
- {
- ShapeAddedByCommand.push_back(instance);
- // Set the position
- instance.setPos(UserEntity->pos());
- instance.setClusterSystem(UserEntity->getClusterSystem()); // for simplicity, assume it is in the same
- // cluster system than the user
- // Compute the direction Matrix
- CMatrix dir;
- dir.identity();
- CVector vi = UserEntity->dir()^CVector(0.f, 0.f, 1.f);
- CVector vk = vi^UserEntity->dir();
- dir.setRot(vi, UserEntity->dir(), vk, true);
- // Set Orientation : User Direction should be normalized.
- instance.setRotQuat(dir.getRot());
- // if the shape is a particle system, additionnal parameters are user params
- UParticleSystemInstance psi;
- psi.cast (instance);
- if (!psi.empty())
+ // set each user param that is present
+ for(uint k = 0; k < 4; ++k)
+ {
+ if (args.size() >= (k + 2))
{
- // set each user param that is present
- for(uint k = 0; k < 4; ++k)
- {
- if (args.size() >= (k + 2))
- {
- float uparam;
- if (fromString(args[k + 1], uparam))
- {
- psi.setUserParam(k, uparam);
- }
- else
- {
- nlwarning("Cant read param %d", k);
- }
- }
- }
+ float uparam;
+ if (fromString(args[k + 1], uparam))
+ {
+ psi.setUserParam(k, uparam);
+ }
+ else
+ {
+ nlwarning("Cant read param %d", k);
+ }
}
+ }
}
- else
- {
- nlwarning("Command 'shape': cannot find the shape %s.", args[0].c_str());
- }
+ }
+ else
+ {
+ nlwarning("Command 'shape': cannot find the shape %s.", args[0].c_str());
+ }
- // Command Well Done
- return true;
+ // Command Well Done
+ return true;
}
NLMISC_COMMAND(bugReport, "Call the bug report tool with dump", "")
{
- const char *brname[] = { "bug_report.exe", "bug_report_r.exe", "bug_report_rd.exe", "bug_report_df.exe", "bug_report_d.exe" };
+ const char *brname[] = { "bug_report.exe", "bug_report_r.exe", "bug_report_rd.exe", "bug_report_df.exe", "bug_report_d.exe" };
- string brn;
+ string brn;
- for (uint i = 0; i < sizeof(brname)/sizeof(brname[0]); i++)
+ for (uint i = 0; i < sizeof(brname)/sizeof(brname[0]); i++)
+ {
+ if (CFile::fileExists (brname[i]))
{
- if (CFile::fileExists (brname[i]))
- {
- brn = brname[i];
- break;
- }
+ brn = brname[i];
+ break;
}
+ }
- if (brn.empty())
- {
- log.displayNL("bug_report*.exe not found");
- return false;
- }
+ if (brn.empty())
+ {
+ log.displayNL("bug_report*.exe not found");
+ return false;
+ }
- string sys;
+ string sys;
- sys = "Language "+CI18N::getCurrentLanguageName().toString() +" ";
+ sys = "Language "+CI18N::getCurrentLanguageName().toString() +" ";
- if (args.size()>0)
- {
- uint8 quality;
- fromString(args[0], quality);
- if (quality == 0)
- quality = 80;
+ if (args.size()>0)
+ {
+ uint8 quality;
+ fromString(args[0], quality);
+ if (quality == 0)
+ quality = 80;
- CBitmap btm;
- Driver->getBuffer(btm);
- string filename = CFile::findNewFile (getLogDirectory() + "screenshot.jpg");
- COFile fs(filename);
- btm.writeJPG(fs, quality);
- sys += "AttachedFile "+filename+" ";
- }
+ CBitmap btm;
+ Driver->getBuffer(btm);
+ string filename = CFile::findNewFile (getLogDirectory() + "screenshot.jpg");
+ COFile fs(filename);
+ btm.writeJPG(fs, quality);
+ sys += "AttachedFile "+filename+" ";
+ }
- sys += NLMISC::toString("ClientVersion %s ", getVersion().c_str());
+ sys += NLMISC::toString("ClientVersion %s ", getVersion().c_str());
- // for now, set the same version than client one
- sys += NLMISC::toString("ShardVersion %s ", getVersion().c_str());
+ // for now, set the same version than client one
+ sys += NLMISC::toString("ShardVersion %s ", getVersion().c_str());
- if (ClientCfg.Local)
- sys += "ShardName OFFLINE ";
+ if (ClientCfg.Local)
+ sys += "ShardName OFFLINE ";
- FILE *fp = fopen (std::string(getLogDirectory() + "bug_report.txt").c_str(), "wb");
- if (fp != NULL)
- {
- string res = addSlashR(getDebugInformation());
+ FILE *fp = fopen (std::string(getLogDirectory() + "bug_report.txt").c_str(), "wb");
+ if (fp != NULL)
+ {
+ string res = addSlashR(getDebugInformation());
- // must put \r\n each line
- fprintf(fp, "%s", res.c_str());
+ // must put \r\n each line
+ fprintf(fp, "%s", res.c_str());
-// // must put \r\n each line
-// fprintf (fp, "UserId: %u\r\n", NetMngr.getUserId());
-// fprintf (fp, "Player Name: '%s'.\r\n", UserEntity->getName().toString().c_str());
-// fprintf (fp, "UserPosition: %.2f %.2f %.2f\r\n", UserEntity->pos().x, UserEntity->pos().y, UserEntity->pos().z);
-// fprintf (fp, "ViewPosition: %.2f %.2f %.2f\r\n", View.viewPos().x, View.viewPos().y, View.viewPos().z);
-// time_t ts; time( &ts );
-// fprintf (fp, "LocalTime: %s\r\n", NLMISC::IDisplayer::dateToHumanString( ts ) );
-// fprintf (fp, "ServerTick: %u\r\n", NetMngr.getCurrentServerTick());
-// fprintf (fp, "ConnectState: %s\r\n", NetMngr.getConnectionStateCStr());
-// fprintf (fp, "LocalAddress: %s\r\n", NetMngr.getAddress().asString().c_str());
+ // // must put \r\n each line
+ // fprintf (fp, "UserId: %u\r\n", NetMngr.getUserId());
+ // fprintf (fp, "Player Name: '%s'.\r\n", UserEntity->getName().toString().c_str());
+ // fprintf (fp, "UserPosition: %.2f %.2f %.2f\r\n", UserEntity->pos().x, UserEntity->pos().y, UserEntity->pos().z);
+ // fprintf (fp, "ViewPosition: %.2f %.2f %.2f\r\n", View.viewPos().x, View.viewPos().y, View.viewPos().z);
+ // time_t ts; time( &ts );
+ // fprintf (fp, "LocalTime: %s\r\n", NLMISC::IDisplayer::dateToHumanString( ts ) );
+ // fprintf (fp, "ServerTick: %u\r\n", NetMngr.getCurrentServerTick());
+ // fprintf (fp, "ConnectState: %s\r\n", NetMngr.getConnectionStateCStr());
+ // fprintf (fp, "LocalAddress: %s\r\n", NetMngr.getAddress().asString().c_str());
- fclose (fp);
+ fclose (fp);
- sys += "DumpFilename bug_report.txt ";
- }
+ sys += "DumpFilename bug_report.txt ";
+ }
- nlinfo ("Calling for bug report : '%s %s'", brn.c_str(), sys.c_str());
+ nlinfo ("Calling for bug report : '%s %s'", brn.c_str(), sys.c_str());
- launchProgram(brn, sys);
+ launchProgram(brn, sys);
- // give some cpu to the launched application
- nlSleep (3000);
+ // give some cpu to the launched application
+ nlSleep (3000);
- return true;
+ return true;
}
//
@@ -738,39 +738,39 @@ NLMISC_COMMAND(bugReport, "Call the bug report tool with dump", "
NLMISC_COMMAND(a, "Execute an admin command on you"," ")
{
- if(args.size() == 0)
- return false;
+ if(args.size() == 0)
+ return false;
- CBitMemStream out;
- if (!GenericMsgHeaderMngr.pushNameToStream("COMMAND:ADMIN", out))
- return false;
+ CBitMemStream out;
+ if (!GenericMsgHeaderMngr.pushNameToStream("COMMAND:ADMIN", out))
+ return false;
- string cmd, arg;
- cmd = args[0];
- for (uint i = 1; i < args.size(); i++)
+ string cmd, arg;
+ cmd = args[0];
+ for (uint i = 1; i < args.size(); i++)
+ {
+ // temporary fix for utf-8
+ // servers commands are not decoded so convert them to ansi
+ std::string tmp = ucstring::makeFromUtf8(args[i]).toString();
+
+ if (!arg.empty())
+ arg += ' ';
+ if (tmp.find(' ') != std::string::npos)
{
- // temporary fix for utf-8
- // servers commands are not decoded so convert them to ansi
- std::string tmp = ucstring::makeFromUtf8(args[i]).toString();
-
- if (!arg.empty())
- arg += ' ';
- if (tmp.find(' ') != std::string::npos)
- {
- arg += "\"" + tmp + "\"";
- }
- else
- {
- arg += tmp;
- }
+ arg += "\"" + tmp + "\"";
}
- bool onTarget = false;
- out.serial (onTarget);
- out.serial (cmd);
- out.serial (arg);
- NetMngr.push (out);
+ else
+ {
+ arg += tmp;
+ }
+ }
+ bool onTarget = false;
+ out.serial (onTarget);
+ out.serial (cmd);
+ out.serial (arg);
+ NetMngr.push (out);
- return true;
+ return true;
}
//
@@ -782,39 +782,39 @@ NLMISC_COMMAND(a, "Execute an admin command on you"," ")
NLMISC_COMMAND(b, "Execute an admin command on your target"," ")
{
- if(args.size() == 0)
- return false;
+ if(args.size() == 0)
+ return false;
- CBitMemStream out;
- if (!GenericMsgHeaderMngr.pushNameToStream("COMMAND:ADMIN", out))
- return false;
+ CBitMemStream out;
+ if (!GenericMsgHeaderMngr.pushNameToStream("COMMAND:ADMIN", out))
+ return false;
- string cmd, arg;
- cmd = args[0];
- for (uint i = 1; i < args.size(); i++)
+ string cmd, arg;
+ cmd = args[0];
+ for (uint i = 1; i < args.size(); i++)
+ {
+ // temporary fix for utf-8
+ // servers commands are not decoded so convert them to ansi
+ std::string tmp = ucstring::makeFromUtf8(args[i]).toString();
+
+ if (!arg.empty())
+ arg += ' ';
+ if (tmp.find(' ') != std::string::npos)
{
- // temporary fix for utf-8
- // servers commands are not decoded so convert them to ansi
- std::string tmp = ucstring::makeFromUtf8(args[i]).toString();
-
- if (!arg.empty())
- arg += ' ';
- if (tmp.find(' ') != std::string::npos)
- {
- arg += "\"" + tmp + "\"";
- }
- else
- {
- arg += tmp;
- }
+ arg += "\"" + tmp + "\"";
}
- bool onTarget = true;
- out.serial (onTarget);
- out.serial (cmd);
- out.serial (arg);
- NetMngr.push (out);
+ else
+ {
+ arg += tmp;
+ }
+ }
+ bool onTarget = true;
+ out.serial (onTarget);
+ out.serial (cmd);
+ out.serial (arg);
+ NetMngr.push (out);
- return true;
+ return true;
}
//
@@ -827,484 +827,484 @@ NLMISC_COMMAND(b, "Execute an admin command on your target"," ")
NLMISC_COMMAND(c, "Execute an admin command on character name"," ")
{
- if(args.size() < 2)
- return false;
+ if(args.size() < 2)
+ return false;
- CBitMemStream out;
- if (!GenericMsgHeaderMngr.pushNameToStream("COMMAND:ADMIN_OFFLINE", out))
- return false;
+ CBitMemStream out;
+ if (!GenericMsgHeaderMngr.pushNameToStream("COMMAND:ADMIN_OFFLINE", out))
+ return false;
- string characterName, cmd, arg;
+ string characterName, cmd, arg;
- characterName = args[0];
- cmd = args[1];
- for (uint i = 2; i < args.size(); i++)
+ characterName = args[0];
+ cmd = args[1];
+ for (uint i = 2; i < args.size(); i++)
+ {
+ // temporary fix for utf-8
+ // servers commands are not decoded so convert them to ansi
+ std::string tmp = ucstring::makeFromUtf8(args[i]).toString();
+
+ if (!arg.empty())
+ arg += ' ';
+ if (tmp.find(' ') != std::string::npos)
{
- // temporary fix for utf-8
- // servers commands are not decoded so convert them to ansi
- std::string tmp = ucstring::makeFromUtf8(args[i]).toString();
-
- if (!arg.empty())
- arg += ' ';
- if (tmp.find(' ') != std::string::npos)
- {
- arg += "\"" + tmp + "\"";
- }
- else
- {
- arg += tmp;
- }
+ arg += "\"" + tmp + "\"";
}
- out.serial (characterName);
- out.serial (cmd);
- out.serial (arg);
- NetMngr.push (out);
+ else
+ {
+ arg += tmp;
+ }
+ }
+ out.serial (characterName);
+ out.serial (cmd);
+ out.serial (arg);
+ NetMngr.push (out);
- return true;
+ return true;
}
NLMISC_COMMAND(boxes, "Show/Hide selection boxes", "[ : 0 to Hide, anything else to Show. Invert the current state if nothing specified.]")
{
#if FINAL_VERSION
- if (!ClientCfg.ExtendedCommands) return false;
+ if (!ClientCfg.ExtendedCommands) return false;
- if( !ClientCfg.Local && !hasPrivilegeDEV() && !hasPrivilegeSGM() && !hasPrivilegeGM() )
- return true;
+ if( !ClientCfg.Local && !hasPrivilegeDEV() && !hasPrivilegeSGM() && !hasPrivilegeGM() )
+ return true;
#endif // FINAL_VERSION
- // Invert Current State
- if(args.size() == 0)
- {
- // Invert the current value.
- ClientCfg.DrawBoxes = !ClientCfg.DrawBoxes;
- return true;
- }
- // Set Current State
- else if(args.size() == 1)
- {
- // Invert the current value.
- fromString(args[0], ClientCfg.DrawBoxes);
- return true;
- }
- // Bad parameters.
- else
- return false;
+ // Invert Current State
+ if(args.size() == 0)
+ {
+ // Invert the current value.
+ ClientCfg.DrawBoxes = !ClientCfg.DrawBoxes;
+ return true;
+ }
+ // Set Current State
+ else if(args.size() == 1)
+ {
+ // Invert the current value.
+ fromString(args[0], ClientCfg.DrawBoxes);
+ return true;
+ }
+ // Bad parameters.
+ else
+ return false;
}
NLMISC_COMMAND(dump, "Command to create a file with the current state of the client", "[]")
{
- if(args.size() > 1)
- return false;
+ if(args.size() > 1)
+ return false;
- string dumpName;
- if(args.size() == 1)
- dumpName = args[0];
- else
- dumpName = "default";
+ string dumpName;
+ if(args.size() == 1)
+ dumpName = args[0];
+ else
+ dumpName = "default";
- dump(dumpName);
- return true;
+ dump(dumpName);
+ return true;
}
NLMISC_COMMAND(verbose, "Enable/Disable some Debug Information", "none or magic")
{
- // Check parameters.
- if(args.size() != 1)
+ // Check parameters.
+ if(args.size() != 1)
+ {
+ // Help
+ CInterfaceManager *IM = CInterfaceManager::getInstance();
+ IM->displaySystemInfo(ucstring("This command need 1 parameter :"));
+ IM->displaySystemInfo(ucstring(" :"));
+ IM->displaySystemInfo(ucstring("- none(to remove all verboses)"));
+ IM->displaySystemInfo(ucstring("- magic(to add debug infos about magic)"));
+ IM->displaySystemInfo(ucstring("- anim (to add debug infos about animation)"));
+ }
+ else
+ {
+ std::string type = NLMISC::toLower(args[0]);
+ if (type == "none")
+ Verbose = VerboseNone;
+ else if(type == "magic")
+ Verbose |= VerboseMagic;
+ else if(type == "anim")
+ Verbose |= VerboseAnim;
+ else
{
- // Help
- CInterfaceManager *IM = CInterfaceManager::getInstance();
- IM->displaySystemInfo(ucstring("This command need 1 parameter :"));
- IM->displaySystemInfo(ucstring(" :"));
- IM->displaySystemInfo(ucstring("- none(to remove all verboses)"));
- IM->displaySystemInfo(ucstring("- magic(to add debug infos about magic)"));
- IM->displaySystemInfo(ucstring("- anim (to add debug infos about animation)"));
+ CInterfaceManager *IM = CInterfaceManager::getInstance();
+ IM->displaySystemInfo(ucstring("This command need 1 parameter :"));
+ IM->displaySystemInfo(ucstring(" :"));
+ IM->displaySystemInfo(ucstring("- none(to remove all verboses)"));
+ IM->displaySystemInfo(ucstring("- magic(to add debug infos about magic)"));
+ IM->displaySystemInfo(ucstring("- anim (to add debug infos about animation)"));
}
- else
- {
- std::string type = NLMISC::toLower(args[0]);
- if (type == "none")
- Verbose = VerboseNone;
- else if(type == "magic")
- Verbose |= VerboseMagic;
- else if(type == "anim")
- Verbose |= VerboseAnim;
- else
- {
- CInterfaceManager *IM = CInterfaceManager::getInstance();
- IM->displaySystemInfo(ucstring("This command need 1 parameter :"));
- IM->displaySystemInfo(ucstring(" :"));
- IM->displaySystemInfo(ucstring("- none(to remove all verboses)"));
- IM->displaySystemInfo(ucstring("- magic(to add debug infos about magic)"));
- IM->displaySystemInfo(ucstring("- anim (to add debug infos about animation)"));
- }
- }
- return true;
+ }
+ return true;
}
NLMISC_COMMAND(verboseAnimSelection, "Enable/Disable the animation log for the current selection", "")
{
- // Check parameters.
- if(args.size() != 0)
- return false;
+ // Check parameters.
+ if(args.size() != 0)
+ return false;
- VerboseAnimSelection = !VerboseAnimSelection;
- if(VerboseAnimSelection)
- nlinfo("Enable VerboseAnimSelection");
- else
- nlinfo("Disable VerboseAnimSelection");
+ VerboseAnimSelection = !VerboseAnimSelection;
+ if(VerboseAnimSelection)
+ nlinfo("Enable VerboseAnimSelection");
+ else
+ nlinfo("Disable VerboseAnimSelection");
- return true;
+ return true;
}
NLMISC_COMMAND(verboseAnimUser, "Enable/Disable the animation log for the user", "")
{
- // Check parameters.
- if(args.size() != 0)
- return false;
+ // Check parameters.
+ if(args.size() != 0)
+ return false;
- VerboseAnimUser = !VerboseAnimUser;
- if(VerboseAnimUser)
- nlinfo("Enable VerboseAnimUser");
- else
- nlinfo("Disable VerboseAnimUser");
+ VerboseAnimUser = !VerboseAnimUser;
+ if(VerboseAnimUser)
+ nlinfo("Enable VerboseAnimUser");
+ else
+ nlinfo("Disable VerboseAnimUser");
- return true;
+ return true;
}
NLMISC_COMMAND(verboseDatabase, "Enable/Disable the log for the database", "")
{
- // Check parameters.
- if(args.size() != 0)
- return false;
+ // Check parameters.
+ if(args.size() != 0)
+ return false;
- bool v = NLMISC::ICDBNode::isDatabaseVerbose();
- NLMISC::ICDBNode::setVerboseDatabase( !v );
+ bool v = NLMISC::ICDBNode::isDatabaseVerbose();
+ NLMISC::ICDBNode::setVerboseDatabase( !v );
- if( !v )
- nlinfo("Enable VerboseDatabase");
- else
- nlinfo("Disable VerboseDatabase");
+ if( !v )
+ nlinfo("Enable VerboseDatabase");
+ else
+ nlinfo("Disable VerboseDatabase");
- return true;
+ return true;
}
NLMISC_COMMAND(verbosePropertiesLoggingMode, "Set logging mode", "")
{
- // Check parameters.
- if(args.size() != 0)
- return false;
+ // Check parameters.
+ if(args.size() != 0)
+ return false;
- CNetworkConnection::LoggingMode = !CNetworkConnection::LoggingMode;
- if(CNetworkConnection::LoggingMode)
- nlinfo("Enable LoggingMode");
- else
- nlinfo("Disable LoggingMode");
+ CNetworkConnection::LoggingMode = !CNetworkConnection::LoggingMode;
+ if(CNetworkConnection::LoggingMode)
+ nlinfo("Enable LoggingMode");
+ else
+ nlinfo("Disable LoggingMode");
- return true;
+ return true;
}
NLMISC_COMMAND(logEntities, "Write the position and orientation af all entities in the vision in the file 'entities.txt'", "")
{
- // Check parameters
- if(args.size() != 0)
- return false;
+ // Check parameters
+ if(args.size() != 0)
+ return false;
- // Log entities
- EntitiesMngr.writeEntities();
+ // Log entities
+ EntitiesMngr.writeEntities();
- // Command well done.
- return true;
+ // Command well done.
+ return true;
}
NLMISC_COMMAND(log, "Add/Del Positive/Negative Filters for logs", "Log System , Type , Filter ")
{
- // check args, if there s not the right number of parameter, return bad
- if(args.size() < 2 || args.size() > 3)
- return false;
+ // check args, if there s not the right number of parameter, return bad
+ if(args.size() < 2 || args.size() > 3)
+ return false;
- CLog *logSys;
- // Debug log system.
- if (string(args[0].c_str()) == "debug")
- logSys = DebugLog;
- // Info log system.
- else if(string(args[0].c_str()) == "info")
- logSys = InfoLog;
- // Warning log system.
- else if(string(args[0].c_str()) == "warning")
- logSys = WarningLog;
- // Assert log system.
- else if(string(args[0].c_str()) == "assert")
- logSys = AssertLog;
- // Unknown Log System -> return false.
- else
- return false;
+ CLog *logSys;
+ // Debug log system.
+ if (string(args[0].c_str()) == "debug")
+ logSys = DebugLog;
+ // Info log system.
+ else if(string(args[0].c_str()) == "info")
+ logSys = InfoLog;
+ // Warning log system.
+ else if(string(args[0].c_str()) == "warning")
+ logSys = WarningLog;
+ // Assert log system.
+ else if(string(args[0].c_str()) == "assert")
+ logSys = AssertLog;
+ // Unknown Log System -> return false.
+ else
+ return false;
- // Add a positive filter.
- if (string(args[1].c_str()) == "pos")
- logSys->addPositiveFilter(args[2].c_str());
- // Add a negative filter.
- else if(string(args[1].c_str()) == "neg")
- logSys->addNegativeFilter(args[2].c_str());
- // Removes a filter by name (in both filters).
- else if(string(args[1].c_str()) == "del")
- logSys->removeFilter(args[2].c_str());
- // Reset both filters.
- else if(string(args[1].c_str()) == "reset")
- logSys->resetFilters();
- // Unknown Filter -> return false.
- else
- return false;
+ // Add a positive filter.
+ if (string(args[1].c_str()) == "pos")
+ logSys->addPositiveFilter(args[2].c_str());
+ // Add a negative filter.
+ else if(string(args[1].c_str()) == "neg")
+ logSys->addNegativeFilter(args[2].c_str());
+ // Removes a filter by name (in both filters).
+ else if(string(args[1].c_str()) == "del")
+ logSys->removeFilter(args[2].c_str());
+ // Reset both filters.
+ else if(string(args[1].c_str()) == "reset")
+ logSys->resetFilters();
+ // Unknown Filter -> return false.
+ else
+ return false;
- // Command well done.
- return true;
+ // Command well done.
+ return true;
}
NLMISC_COMMAND(execScript, "Execute a script file (.cmd)","")
{
- int size = (int)args.size();
- if (size != 1)
- return false;
+ int size = (int)args.size();
+ if (size != 1)
+ return false;
- CIFile iFile;
+ CIFile iFile;
- if (iFile.open(CPath::lookup(args[0], false)))
+ if (iFile.open(CPath::lookup(args[0], false)))
+ {
+ char line[512];
+ char *buffer;
+ // Read line by line and execute each line
+
+ sint inComment= 0;
+ bool eof = false;
+ while (!eof)
{
- char line[512];
- char *buffer;
- // Read line by line and execute each line
-
- sint inComment= 0;
- bool eof = false;
- while (!eof)
+ buffer = &line[0];
+ uint read = 0;
+ for(;;)
+ {
+ if (read == 512 -1)
{
- buffer = &line[0];
- uint read = 0;
- for(;;)
- {
- if (read == 512 -1)
- {
- *buffer = '\0';
- break;
- }
-
- try
- {
- // read one byte
- iFile.serialBuffer ((uint8 *)buffer, 1);
- }
- catch (const EFile &)
- {
- *buffer = '\0';
- eof = true;
- break;
- }
-
- if (*buffer == '\n')
- {
- *buffer = '\0';
- break;
- }
-
- // skip '\r' char
- if (*buffer != '\r')
- {
- buffer++;
- read++;
- }
- }
-
- // execute line
- if (strlen(line) > 0)
- {
- // if not a single comment
- if(strncmp(line, "//", 2)!=0)
- {
- if(strncmp(line, "/*", 2)==0)
- inComment++;
- if(inComment<=0)
- {
- ucstring ucline(line);
- CInterfaceManager::parseTokens(ucline);
- ICommand::execute(ucline.toUtf8(), g_log);
- }
- if(strncmp(line, "*/", 2)==0)
- inComment--;
- }
- }
-
- // end?
- if (iFile.eof())
- eof = true;
+ *buffer = '\0';
+ break;
}
- iFile.close();
- }
- else
- {
- CInterfaceManager::getInstance()->displaySystemInfo(ucstring("Cannot open file"));
- }
- return true;
+ try
+ {
+ // read one byte
+ iFile.serialBuffer ((uint8 *)buffer, 1);
+ }
+ catch (const EFile &)
+ {
+ *buffer = '\0';
+ eof = true;
+ break;
+ }
+
+ if (*buffer == '\n')
+ {
+ *buffer = '\0';
+ break;
+ }
+
+ // skip '\r' char
+ if (*buffer != '\r')
+ {
+ buffer++;
+ read++;
+ }
+ }
+
+ // execute line
+ if (strlen(line) > 0)
+ {
+ // if not a single comment
+ if(strncmp(line, "//", 2)!=0)
+ {
+ if(strncmp(line, "/*", 2)==0)
+ inComment++;
+ if(inComment<=0)
+ {
+ ucstring ucline(line);
+ CInterfaceManager::parseTokens(ucline);
+ ICommand::execute(ucline.toUtf8(), g_log);
+ }
+ if(strncmp(line, "*/", 2)==0)
+ inComment--;
+ }
+ }
+
+ // end?
+ if (iFile.eof())
+ eof = true;
+ }
+ iFile.close();
+ }
+ else
+ {
+ CInterfaceManager::getInstance()->displaySystemInfo(ucstring("Cannot open file"));
+ }
+
+ return true;
}
NLMISC_COMMAND(db, "Modify Database"," ")
{
- CInterfaceManager *pIM = CInterfaceManager::getInstance();
- int size = (int)args.size();
- if (size == 2)
- {
+ CInterfaceManager *pIM = CInterfaceManager::getInstance();
+ int size = (int)args.size();
+ if (size == 2)
+ {
#if !FINAL_VERSION
- // check if 2nd arg is a sheet name
- if (args[1].empty()) return false;
- sint64 value;
- if (isalpha(args[1][0]))
- {
- CSheetId sheet(args[1]);
- value = (sint64) sheet.asInt();
- }
- else
- {
- // Convert the string into an sint64.
- fromString(args[1], value);
- }
-
- // Set the property.
- CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(args[0], false);
- if(node)
- node->setValue64(value);
- else
- pIM->displaySystemInfo(toString("DB '%s' does not exist.", args[0].c_str()));
-#else
- pIM->displaySystemInfo(ucstring("Can't write to DB when in Final Version."));
-#endif
- }
- else if (size == 1)
+ // check if 2nd arg is a sheet name
+ if (args[1].empty()) return false;
+ sint64 value;
+ if (isalpha(args[1][0]))
{
- CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(args[0], false);
- if(node)
- {
- sint64 prop = node->getValue64();
- string str = toString(prop);
- pIM->displaySystemInfo(ucstring(str));
- nlinfo("%s", str.c_str());
- }
- else
- pIM->displaySystemInfo(toString("DB '%s' does not exist.", args[0].c_str()));
- return true;
+ CSheetId sheet(args[1]);
+ value = (sint64) sheet.asInt();
+ }
+ else
+ {
+ // Convert the string into an sint64.
+ fromString(args[1], value);
}
- else
- return false;
- return true;
+ // Set the property.
+ CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(args[0], false);
+ if(node)
+ node->setValue64(value);
+ else
+ pIM->displaySystemInfo(toString("DB '%s' does not exist.", args[0].c_str()));
+#else
+ pIM->displaySystemInfo(ucstring("Can't write to DB when in Final Version."));
+#endif
+ }
+ else if (size == 1)
+ {
+ CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(args[0], false);
+ if(node)
+ {
+ sint64 prop = node->getValue64();
+ string str = toString(prop);
+ pIM->displaySystemInfo(ucstring(str));
+ nlinfo("%s", str.c_str());
+ }
+ else
+ pIM->displaySystemInfo(toString("DB '%s' does not exist.", args[0].c_str()));
+ return true;
+ }
+ else
+ return false;
+
+ return true;
}
static bool talkInChan(uint32 nb,std::vectorargs)
{
- uint32 maxChans = CChatGroup::MaxDynChanPerPlayer;
- if (nb>=maxChans)
- {
- return false;
- }
- if(args.size()>0)
- {
- std::string tmp="";
- std::vector::const_iterator first(args.begin()),last(args.end());
+ uint32 maxChans = CChatGroup::MaxDynChanPerPlayer;
+ if (nb>=maxChans)
+ {
+ return false;
+ }
+ if(args.size()>0)
+ {
+ std::string tmp="";
+ std::vector::const_iterator first(args.begin()),last(args.end());
- for(;first!=last;++first)
- {
- tmp = tmp + (*first);
- tmp = tmp+" ";
- }
-
- ucstring uctmp;
- uctmp.fromUtf8(tmp);
- PeopleInterraction.talkInDynamicChannel(nb, uctmp);
- return true;
- }
- else
+ for(;first!=last;++first)
{
- ChatMngr.updateChatModeAndButton(CChatGroup::dyn_chat, nb);
+ tmp = tmp + (*first);
+ tmp = tmp+" ";
}
- return false;
+
+ ucstring uctmp;
+ uctmp.fromUtf8(tmp);
+ PeopleInterraction.talkInDynamicChannel(nb, uctmp);
+ return true;
+ }
+ else
+ {
+ ChatMngr.updateChatModeAndButton(CChatGroup::dyn_chat, nb);
+ }
+ return false;
}
NLMISC_COMMAND(0,"talk in 0th dynamic chat channel"," ")
{
- return talkInChan(0,args);
+ return talkInChan(0,args);
}
NLMISC_COMMAND(1,"talk in first dynamic chat channel"," ")
{
- return talkInChan(1,args);
+ return talkInChan(1,args);
}
NLMISC_COMMAND(2,"talk in 2nd dynamic chat channel"," ")
{
- return talkInChan(2,args);
+ return talkInChan(2,args);
}
NLMISC_COMMAND(3,"talk in 3rd dynamic chat channel"," ")
{
- return talkInChan(3,args);
+ return talkInChan(3,args);
}
NLMISC_COMMAND(4,"talk in 4th dynamic chat channel"," ")
{
- return talkInChan(4,args);
+ return talkInChan(4,args);
}
NLMISC_COMMAND(5,"talk in 5th dynamic chat channel"," ")
{
- return talkInChan(5,args);
+ return talkInChan(5,args);
}
NLMISC_COMMAND(6,"talk in 6th dynamic chat channel"," ")
{
- return talkInChan(6,args);
+ return talkInChan(6,args);
}
NLMISC_COMMAND(7,"talk in 7th dynamic chat channel"," ")
{
- return talkInChan(7,args);
+ return talkInChan(7,args);
}
NLMISC_COMMAND(setItemName, "set name of items, sbrick, etc.."," ")
{
- if (args.size() < 2) return false;
- CSheetId id(args[0]);
- ucstring name;
- name.fromUtf8(args[1]);
- ucstring desc;
- ucstring desc2;
- if (args.size() > 2)
- desc.fromUtf8(args[2]);
- if (args.size() > 2)
- desc2.fromUtf8(args[3]);
+ if (args.size() < 2) return false;
+ CSheetId id(args[0]);
+ ucstring name;
+ name.fromUtf8(args[1]);
+ ucstring desc;
+ ucstring desc2;
+ if (args.size() > 2)
+ desc.fromUtf8(args[2]);
+ if (args.size() > 2)
+ desc2.fromUtf8(args[3]);
- STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
- if (pSMC)
- pSMC->replaceSBrickName(id, name, desc, desc2);
- else
- return false;
- return true;
+ STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
+ if (pSMC)
+ pSMC->replaceSBrickName(id, name, desc, desc2);
+ else
+ return false;
+ return true;
}
NLMISC_COMMAND(setMissingDynstringText, "set text of missing dynamic string"," ")
{
- if (args.size() < 2) return false;
- ucstring name;
- name.fromUtf8(args[0]);
- ucstring text;
- text.fromUtf8(args[1]);
+ if (args.size() < 2) return false;
+ ucstring name;
+ name.fromUtf8(args[0]);
+ ucstring text;
+ text.fromUtf8(args[1]);
- STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
- if (pSMC)
- pSMC->replaceDynString(name, text);
- else
- return false;
- return true;
+ STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
+ if (pSMC)
+ pSMC->replaceDynString(name, text);
+ else
+ return false;
+ return true;
}
@@ -1323,561 +1323,573 @@ NLMISC_COMMAND(setMissingDynstringText, "set text of missing dynamic string"," <
NLMISC_COMMAND(ah, "Launch an action handler", " ")
{
+<<<<<<< local
+ if (args.size() == 0)
+ return false;
+
+ if (!ClientCfg.AllowDebugLua && toLower(args[0]) == "lua")
+||||||| base
+ if (args.size() == 0)
+ return false;
+
+ if (!ClientCfg.AllowDebugLua && strlwr(args[0]) == "lua")
+=======
if (args.size() == 0)
return false;
if (!ClientCfg.AllowDebugLua && toLower(args[0]) == "lua")
+>>>>>>> other
{
return false; // not allowed!!
}
- CInterfaceManager *pIM = CInterfaceManager::getInstance();
- if (args.size() == 1)
- {
- CAHManager::getInstance()->runActionHandler(args[0], NULL);
- }
- else
- {
- CAHManager::getInstance()->runActionHandler(args[0], NULL, args[1]);
- }
+ CInterfaceManager *pIM = CInterfaceManager::getInstance();
+ if (args.size() == 1)
+ {
+ CAHManager::getInstance()->runActionHandler(args[0], NULL);
+ }
+ else
+ {
+ CAHManager::getInstance()->runActionHandler(args[0], NULL, args[1]);
+ }
- return true;
+ return true;
}
static void setDynString(uint32 strID, const std::string &value)
{
- STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
- pSMC->receiveString(strID, ucstring(value));
- CBitMemStream bm;
- if (bm.isReading()) bm.invert();
- bm.serial(strID);
- bm.serial(strID);
- bm.invert();
- bm.seek(0, NLMISC::IStream::begin);
- pSMC->receiveDynString(bm);
+ STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
+ pSMC->receiveString(strID, ucstring(value));
+ CBitMemStream bm;
+ if (bm.isReading()) bm.invert();
+ bm.serial(strID);
+ bm.serial(strID);
+ bm.invert();
+ bm.seek(0, NLMISC::IStream::begin);
+ pSMC->receiveDynString(bm);
}
// for debug purposes, insert a string in the
NLMISC_COMMAND(setDynString, "set a dynamic string"," ")
{
- if (args.size() != 2) return false;
- uint32 strID;
- fromString(args[0], strID);
- setDynString(strID, args[1]);
- return true;
+ if (args.size() != 2) return false;
+ uint32 strID;
+ fromString(args[0], strID);
+ setDynString(strID, args[1]);
+ return true;
}
class CAnimProgress : public IProgressCallback
{
public:
- // Update the progress bar
- virtual void progress (float value)
- {
- // can't do anything if no driver
- if(Driver == NULL)
- return;
- // Get croped value
- value = getCropedValue (value);
- // Set matrix
- Driver->setMatrixMode2D11();
- // Display a progress bar background
- Driver->drawQuad (PROGRESS_BAR_LEFT, 0.5f-PROGRESS_BAR_HEIGHT/2.0f, PROGRESS_BAR_LEFT+ PROGRESS_BAR_WIDTH, 0.5f+PROGRESS_BAR_HEIGHT/2.0f,
- PROGRESS_BAR_BG_COLOR);
- // Display a progress bar
- Driver->drawQuad (PROGRESS_BAR_LEFT, 0.5f-PROGRESS_BAR_HEIGHT/2.0f, PROGRESS_BAR_LEFT+value*PROGRESS_BAR_WIDTH, 0.5f+PROGRESS_BAR_HEIGHT/2.0f,
- PROGRESS_BAR_COLOR);
- if(TextContext != NULL)
- {
- // Init the Pen.
- TextContext->setKeep800x600Ratio(false);
- TextContext->setColor(CRGBA(255,255,255));
- TextContext->setFontSize(20);
- TextContext->setHotSpot(UTextContext::MiddleMiddle);
+ // Update the progress bar
+ virtual void progress (float value)
+ {
+ // can't do anything if no driver
+ if(Driver == NULL)
+ return;
+ // Get croped value
+ value = getCropedValue (value);
+ // Set matrix
+ Driver->setMatrixMode2D11();
+ // Display a progress bar background
+ Driver->drawQuad (PROGRESS_BAR_LEFT, 0.5f-PROGRESS_BAR_HEIGHT/2.0f, PROGRESS_BAR_LEFT+ PROGRESS_BAR_WIDTH, 0.5f+PROGRESS_BAR_HEIGHT/2.0f,
+ PROGRESS_BAR_BG_COLOR);
+ // Display a progress bar
+ Driver->drawQuad (PROGRESS_BAR_LEFT, 0.5f-PROGRESS_BAR_HEIGHT/2.0f, PROGRESS_BAR_LEFT+value*PROGRESS_BAR_WIDTH, 0.5f+PROGRESS_BAR_HEIGHT/2.0f,
+ PROGRESS_BAR_COLOR);
+ if(TextContext != NULL)
+ {
+ // Init the Pen.
+ TextContext->setKeep800x600Ratio(false);
+ TextContext->setColor(CRGBA(255,255,255));
+ TextContext->setFontSize(20);
+ TextContext->setHotSpot(UTextContext::MiddleMiddle);
- // Display the Text.
- TextContext->printfAt(0.5f, 0.5f, _ProgressMessage.c_str());
- }
- // Display to screen.
- Driver->swapBuffers();
- }
- // New message
- void newMessage(const std::string &message) {_ProgressMessage = message;}
+ // Display the Text.
+ TextContext->printfAt(0.5f, 0.5f, _ProgressMessage.c_str());
+ }
+ // Display to screen.
+ Driver->swapBuffers();
+ }
+ // New message
+ void newMessage(const std::string &message) {_ProgressMessage = message;}
private:
- std::string _ProgressMessage;
+ std::string _ProgressMessage;
};
NLMISC_COMMAND(reloadSearchPaths, "reload the search paths","")
{
- if (!args.empty()) return false;
- CPath::memoryUncompress();
- CAnimProgress progress;
- // remove all objects that may depend on an animation
- CProjectileManager::getInstance().reset();
+ if (!args.empty()) return false;
+ CPath::memoryUncompress();
+ CAnimProgress progress;
+ // remove all objects that may depend on an animation
+ CProjectileManager::getInstance().reset();
- // Pathes
- progress.newMessage("Reloading pathes");
- progress.progress(0.0f);
- progress.pushCropedValues(0.0f, 1.0f);
- //
+ // Pathes
+ progress.newMessage("Reloading pathes");
+ progress.progress(0.0f);
+ progress.pushCropedValues(0.0f, 1.0f);
+ //
- addSearchPaths(progress);
- CPath::memoryCompress();
- return true;
+ addSearchPaths(progress);
+ CPath::memoryCompress();
+ return true;
}
NLMISC_COMMAND(reloadAnim, "reload animations","")
{
- CPath::memoryUncompress();
- CAnimProgress dummy;
- // remove all objects that may depend on an animation
- CProjectileManager::getInstance().reset();
+ CPath::memoryUncompress();
+ CAnimProgress dummy;
+ // remove all objects that may depend on an animation
+ CProjectileManager::getInstance().reset();
- // Pathes
- dummy.newMessage("Pathes");
- dummy.progress(0.0f);
- dummy.pushCropedValues(0.0f, 0.5f);
+ // Pathes
+ dummy.newMessage("Pathes");
+ dummy.progress(0.0f);
+ dummy.pushCropedValues(0.0f, 0.5f);
- addSearchPaths(dummy);
+ addSearchPaths(dummy);
- if (ClientCfg.UpdatePackedSheet)
+ if (ClientCfg.UpdatePackedSheet)
+ {
+ for(uint i = 0; i < ClientCfg.UpdatePackedSheetPath.size(); i++)
{
- for(uint i = 0; i < ClientCfg.UpdatePackedSheetPath.size(); i++)
- {
- dummy.progress((float)i/(float)ClientCfg.UpdatePackedSheetPath.size());
- dummy.pushCropedValues ((float)i/(float)ClientCfg.UpdatePackedSheetPath.size(), (float)(i+1)/(float)ClientCfg.UpdatePackedSheetPath.size());
- CPath::addSearchPath(ClientCfg.UpdatePackedSheetPath[i], true, false, &dummy);
- dummy.popCropedValues();
- }
+ dummy.progress((float)i/(float)ClientCfg.UpdatePackedSheetPath.size());
+ dummy.pushCropedValues ((float)i/(float)ClientCfg.UpdatePackedSheetPath.size(), (float)(i+1)/(float)ClientCfg.UpdatePackedSheetPath.size());
+ CPath::addSearchPath(ClientCfg.UpdatePackedSheetPath[i], true, false, &dummy);
+ dummy.popCropedValues();
}
+ }
- dummy.popCropedValues();
- // Animations
- dummy.newMessage("Anims");
- dummy.progress(0.5f);
- dummy.pushCropedValues(0.5f, 1.0f);
- EAM->load(dummy, true);
- dummy.popCropedValues();
- // Reload Animations
- EntitiesMngr.reloadAnims();
- CPath::memoryCompress();
- return true;
+ dummy.popCropedValues();
+ // Animations
+ dummy.newMessage("Anims");
+ dummy.progress(0.5f);
+ dummy.pushCropedValues(0.5f, 1.0f);
+ EAM->load(dummy, true);
+ dummy.popCropedValues();
+ // Reload Animations
+ EntitiesMngr.reloadAnims();
+ CPath::memoryCompress();
+ return true;
}
NLMISC_COMMAND(reloadAttack, "reload attack", "")
{
- if (!args.empty()) return false;
- // remove all objects that may depend on an animation
- ClientSheetsStrings.memoryUncompress();
- CProjectileManager::getInstance().reset();
- EntitiesMngr.removeAllAttachedFX();
- FXMngr.reset();
- //
- std::vector exts;
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // replace attack list of creature in place (so pointers on character sheets remains valid)
- CSheetManager sheetManager;
- exts;
- // exts.push_back("creature");
- exts.push_back("race_stats");
- NLMISC::IProgressCallback progress;
- sheetManager.loadAllSheet(progress, true, false, false, true, &exts);
- //
- const CSheetManager::TEntitySheetMap &sm = SheetMngr.getSheets();
- for(CSheetManager::TEntitySheetMap::const_iterator it = sm.begin(); it != sm.end(); ++it)
+ if (!args.empty()) return false;
+ // remove all objects that may depend on an animation
+ ClientSheetsStrings.memoryUncompress();
+ CProjectileManager::getInstance().reset();
+ EntitiesMngr.removeAllAttachedFX();
+ FXMngr.reset();
+ //
+ std::vector exts;
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ // replace attack list of creature in place (so pointers on character sheets remains valid)
+ CSheetManager sheetManager;
+ exts;
+ // exts.push_back("creature");
+ exts.push_back("race_stats");
+ NLMISC::IProgressCallback progress;
+ sheetManager.loadAllSheet(progress, true, false, false, true, &exts);
+ //
+ const CSheetManager::TEntitySheetMap &sm = SheetMngr.getSheets();
+ for(CSheetManager::TEntitySheetMap::const_iterator it = sm.begin(); it != sm.end(); ++it)
+ {
+ if (it->second.EntitySheet && it->second.EntitySheet->Type == CEntitySheet::FAUNA)
{
- if (it->second.EntitySheet && it->second.EntitySheet->Type == CEntitySheet::FAUNA)
- {
- // find matching sheet in new sheetManager
- const CEntitySheet *other = sheetManager.get(it->first);
- if (other)
- {
- // replace data in place
- ((CCharacterSheet &) *it->second.EntitySheet).AttackLists = ((const CCharacterSheet &) *other).AttackLists;
- }
- }
- else if(it->second.EntitySheet && it->second.EntitySheet->Type == CEntitySheet::RACE_STATS)
- {
- // find matching sheet in new sheetManager
- const CEntitySheet *other = sheetManager.get(it->first);
- if (other)
- {
- // replace data in place
- ((CRaceStatsSheet &) *it->second.EntitySheet).AttackLists = ((const CRaceStatsSheet &) *other).AttackLists;
- }
- }
+ // find matching sheet in new sheetManager
+ const CEntitySheet *other = sheetManager.get(it->first);
+ if (other)
+ {
+ // replace data in place
+ ((CCharacterSheet &) *it->second.EntitySheet).AttackLists = ((const CCharacterSheet &) *other).AttackLists;
+ }
}
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- CAttackListManager::getInstance().release();
- // form to reload all sheets of interest
- exts.clear();
- exts.push_back("attack_list");
- exts.push_back("animation_fx_set");
- exts.push_back("id_to_string_array");
- CDummyProgress dp;
- SheetMngr.loadAllSheet(dp, true, false, true, true, &exts);
- CAttackListManager::getInstance().init();
- //
- ClientSheetsStrings.memoryCompress();
- return true;
+ else if(it->second.EntitySheet && it->second.EntitySheet->Type == CEntitySheet::RACE_STATS)
+ {
+ // find matching sheet in new sheetManager
+ const CEntitySheet *other = sheetManager.get(it->first);
+ if (other)
+ {
+ // replace data in place
+ ((CRaceStatsSheet &) *it->second.EntitySheet).AttackLists = ((const CRaceStatsSheet &) *other).AttackLists;
+ }
+ }
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ CAttackListManager::getInstance().release();
+ // form to reload all sheets of interest
+ exts.clear();
+ exts.push_back("attack_list");
+ exts.push_back("animation_fx_set");
+ exts.push_back("id_to_string_array");
+ CDummyProgress dp;
+ SheetMngr.loadAllSheet(dp, true, false, true, true, &exts);
+ CAttackListManager::getInstance().init();
+ //
+ ClientSheetsStrings.memoryCompress();
+ return true;
}
NLMISC_COMMAND(reloadSky, "reload new style sky", "")
{
- if (!args.empty()) return false;
- ContinentMngr.reloadSky();
- return false;
+ if (!args.empty()) return false;
+ ContinentMngr.reloadSky();
+ return false;
}
NLMISC_COMMAND(missionReward, "debug"," ")
{
- if (args.size() == 1)
+ if (args.size() == 1)
+ {
+ uint8 index;
+ fromString(args[0], index);
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream("BOTCHAT:COMPLETE_MISSION", out))
{
- uint8 index;
- fromString(args[0], index);
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream("BOTCHAT:COMPLETE_MISSION", out))
- {
- out.serial(index);
- NetMngr.push(out);
- }
- else
- nlwarning(" : unknown message name : BOTCHAT:COMPLETE_MISSION");
- return true;
+ out.serial(index);
+ NetMngr.push(out);
}
- return false;
+ else
+ nlwarning(" : unknown message name : BOTCHAT:COMPLETE_MISSION");
+ return true;
+ }
+ return false;
}
NLMISC_COMMAND(missionProgress, "debug"," ")
{
- if (args.size() == 1)
+ if (args.size() == 1)
+ {
+ uint8 index;
+ fromString(args[0], index);
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream("BOTCHAT:PROGRESS_MISSION", out))
{
- uint8 index;
- fromString(args[0], index);
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream("BOTCHAT:PROGRESS_MISSION", out))
- {
- out.serial(index);
- NetMngr.push(out);
- }
- else
- nlwarning(" : unknown message name : BOTCHAT:PROGRESS_MISSION");
- return true;
+ out.serial(index);
+ NetMngr.push(out);
}
- return false;
+ else
+ nlwarning(" : unknown message name : BOTCHAT:PROGRESS_MISSION");
+ return true;
+ }
+ return false;
}
/*
-NLMISC_COMMAND( displayDBModifs, "display server database modification in the chat window"," ")
-{
- if ( VerboseDatabase )
- CInterfaceManager::getInstance()->getChatOutput()->addTextChild(ucstring("the database is already in verbose mode"),CRGBA(255,255,255,255));
- else
- {
- CInterfaceManager::getInstance()->getChatOutput()->addTextChild(ucstring("database is now in verbose mode"),CRGBA(255,255,255,255));
- VerboseDatabase = true;
- }
- return true;
-}
+ NLMISC_COMMAND( displayDBModifs, "display server database modification in the chat window"," ")
+ {
+ if ( VerboseDatabase )
+ CInterfaceManager::getInstance()->getChatOutput()->addTextChild(ucstring("the database is already in verbose mode"),CRGBA(255,255,255,255));
+ else
+ {
+ CInterfaceManager::getInstance()->getChatOutput()->addTextChild(ucstring("database is now in verbose mode"),CRGBA(255,255,255,255));
+ VerboseDatabase = true;
+ }
+ return true;
+ }
-NLMISC_COMMAND( hideDBModifs, "stop displaying server database modification in the chat window"," ")
-{
- if ( !VerboseDatabase )
- CInterfaceManager::getInstance()->getChatOutput()->addTextChild(ucstring("the database is already not in verbose mode"),CRGBA(255,255,255,255));
- else
- {
- CInterfaceManager::getInstance()->getChatOutput()->addTextChild(ucstring("database is not in verbose mode anymore"),CRGBA(255,255,255,255));
- VerboseDatabase = false;
- }
- return true;
-}
+ NLMISC_COMMAND( hideDBModifs, "stop displaying server database modification in the chat window"," ")
+ {
+ if ( !VerboseDatabase )
+ CInterfaceManager::getInstance()->getChatOutput()->addTextChild(ucstring("the database is already not in verbose mode"),CRGBA(255,255,255,255));
+ else
+ {
+ CInterfaceManager::getInstance()->getChatOutput()->addTextChild(ucstring("database is not in verbose mode anymore"),CRGBA(255,255,255,255));
+ VerboseDatabase = false;
+ }
+ return true;
+ }
*/
/*
-NLMISC_COMMAND(save_sentences, "save sentences"," ")
-{
- CSentenceDisplayer::saveSentences();
- return true;
-}
+ NLMISC_COMMAND(save_sentences, "save sentences"," ")
+ {
+ CSentenceDisplayer::saveSentences();
+ return true;
+ }
*/
NLMISC_COMMAND(getSheetId, "get_sheet_id","")
{
- if (args.size() != 1)
- return false;
- CSheetId id(args[0]);
+ if (args.size() != 1)
+ return false;
+ CSheetId id(args[0]);
- CInterfaceManager::getInstance()->displaySystemInfo(ucstring(toString(id.asInt())));
- return true;
+ CInterfaceManager::getInstance()->displaySystemInfo(ucstring(toString(id.asInt())));
+ return true;
}
NLMISC_COMMAND(getSheetName, "get_sheet_name","")
{
- if (args.size() != 1)
- return false;
- uint32 nId;
- fromString(args[0], nId);
- CSheetId id( nId );
+ if (args.size() != 1)
+ return false;
+ uint32 nId;
+ fromString(args[0], nId);
+ CSheetId id( nId );
- string name = id.toString();
+ string name = id.toString();
- CInterfaceManager::getInstance()->displaySystemInfo(ucstring(name));
- return true;
+ CInterfaceManager::getInstance()->displaySystemInfo(ucstring(name));
+ return true;
}
NLMISC_COMMAND(forgetAll, "forget all bricks", "")
{
- // Check parameters.
- if(args.size() != 0)
- {
- return false;
- }
- char buf[100];
- for (uint i = 0;i<20;i++)
- {
- sprintf(buf,"SERVER:BRICK_FAMILY:%d:BRICKS",i);
- CCDBNodeLeaf * node= NLGUI::CDBManager::getInstance()->getDbProp(buf);
- node->setValue64(0);
- }
- return true;
+ // Check parameters.
+ if(args.size() != 0)
+ {
+ return false;
+ }
+ char buf[100];
+ for (uint i = 0;i<20;i++)
+ {
+ sprintf(buf,"SERVER:BRICK_FAMILY:%d:BRICKS",i);
+ CCDBNodeLeaf * node= NLGUI::CDBManager::getInstance()->getDbProp(buf);
+ node->setValue64(0);
+ }
+ return true;
}
NLMISC_COMMAND(usePreprogMagic, "use the specified magic preprog sentence", "")
{
- // Check parameters.
- if(args.size() != 1)
- {
- return false;
- }
+ // Check parameters.
+ if(args.size() != 1)
+ {
+ return false;
+ }
- // Create the message for the server to execute a phrase.
- const string msgName = "SENTENCE:EXECUTE";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream("SENTENCE:EXECUTE", out))
- {
- uint8 phrase;
- fromString(args[0], phrase);
- out.serial(phrase);
+ // Create the message for the server to execute a phrase.
+ const string msgName = "SENTENCE:EXECUTE";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream("SENTENCE:EXECUTE", out))
+ {
+ uint8 phrase;
+ fromString(args[0], phrase);
+ out.serial(phrase);
- BRICK_TYPE::EBrickType type = BRICK_TYPE::MAGIC;
- out.serialEnum( type );
+ BRICK_TYPE::EBrickType type = BRICK_TYPE::MAGIC;
+ out.serialEnum( type );
- NetMngr.push(out);
- }
- else
- nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
+ NetMngr.push(out);
+ }
+ else
+ nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
- return true;
+ return true;
}
NLMISC_COMMAND(usePreprogCombat, "use the specified combat preprog sentence", "")
{
- // Check parameters.
- if(args.size() != 1)
- {
- return false;
- }
+ // Check parameters.
+ if(args.size() != 1)
+ {
+ return false;
+ }
- // Create the message for the server to execute a phrase.
- const string msgName = "SENTENCE:EXECUTE";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream("SENTENCE:EXECUTE", out))
- {
- uint8 phrase;
- fromString(args[0], phrase);
- out.serial(phrase);
+ // Create the message for the server to execute a phrase.
+ const string msgName = "SENTENCE:EXECUTE";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream("SENTENCE:EXECUTE", out))
+ {
+ uint8 phrase;
+ fromString(args[0], phrase);
+ out.serial(phrase);
- BRICK_TYPE::EBrickType type = BRICK_TYPE::COMBAT;
- out.serialEnum( type );
+ BRICK_TYPE::EBrickType type = BRICK_TYPE::COMBAT;
+ out.serialEnum( type );
- NetMngr.push(out);
- }
- else
- nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
+ NetMngr.push(out);
+ }
+ else
+ nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
- return true;
+ return true;
}
NLMISC_COMMAND(engage, "engage target in combat", "")
{
- // Create the message for the server to execute a phrase.
- const string msgName = "COMBAT:ENGAGE";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
- {
- NetMngr.push(out);
- }
- else
- nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
+ // Create the message for the server to execute a phrase.
+ const string msgName = "COMBAT:ENGAGE";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
+ {
+ NetMngr.push(out);
+ }
+ else
+ nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
- return true;
+ return true;
}
NLMISC_COMMAND(defaultAttack, "use default attack on target", "")
{
- // Default attack on the current selection.
- UserEntity->attack();
+ // Default attack on the current selection.
+ UserEntity->attack();
- // Well Done.
- return true;
+ // Well Done.
+ return true;
}
NLMISC_COMMAND(disengage, "disengage from combat", "")
{
- // Disengage from combat.
- UserEntity->disengage();
+ // Disengage from combat.
+ UserEntity->disengage();
- // Well Done.
- return true;
+ // Well Done.
+ return true;
}
NLMISC_COMMAND(leaveTeam, "leave team", "")
{
- // Create the message for the server to execute a phrase.
- const string msgName = "TEAM:LEAVE";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
- {
- NetMngr.push(out);
- }
- else
- nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
+ // Create the message for the server to execute a phrase.
+ const string msgName = "TEAM:LEAVE";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
+ {
+ NetMngr.push(out);
+ }
+ else
+ nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
- return true;
+ return true;
}
NLMISC_COMMAND(joinTeam, "join the specified team", "")
{
- // Create the message for the server to execute a phrase.
- const string msgName = "TEAM:JOIN";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
- {
- NetMngr.push(out);
- }
- else
- nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
+ // Create the message for the server to execute a phrase.
+ const string msgName = "TEAM:JOIN";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
+ {
+ NetMngr.push(out);
+ }
+ else
+ nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
- return true;
+ return true;
}
NLMISC_COMMAND(joinTeamProposal, "propose to current target to join the team", "")
{
- // Create the message for the server to execute a phrase.
- const string msgName = "TEAM:JOIN_PROPOSAL";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
- {
- NetMngr.push(out);
- }
- else
- nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
+ // Create the message for the server to execute a phrase.
+ const string msgName = "TEAM:JOIN_PROPOSAL";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
+ {
+ NetMngr.push(out);
+ }
+ else
+ nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
- return true;
+ return true;
}
NLMISC_COMMAND(joinTeamDecline, "decline a join team proposal", "")
{
- // Create the message for the server to execute a phrase.
- const string msgName = "TEAM:JOIN_PROPOSAL_DECLINE";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
- {
- NetMngr.push(out);
- }
- else
- nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
+ // Create the message for the server to execute a phrase.
+ const string msgName = "TEAM:JOIN_PROPOSAL_DECLINE";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
+ {
+ NetMngr.push(out);
+ }
+ else
+ nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
- return true;
+ return true;
}
NLMISC_COMMAND(kickTeammate, "kick someone from your team", "")
{
- // Create the message for the server to execute a phrase.
- const string msgName = "TEAM:KICK";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
- {
- NetMngr.push(out);
- }
- else
- nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
+ // Create the message for the server to execute a phrase.
+ const string msgName = "TEAM:KICK";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
+ {
+ NetMngr.push(out);
+ }
+ else
+ nlwarning("mainLoop : unknown message name : '%s'", msgName.c_str());
- return true;
+ return true;
}
NLMISC_COMMAND(cancelCurrentSentence, "cancel the sentence being executed", "")
{
- // no parameter needed
+ // no parameter needed
- // Create the message for the server to cancel the phrase being executed
- const string msgName = "SENTENCE:CANCEL_CURRENT";
- CBitMemStream out;
- if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
- {
- NetMngr.push(out);
- }
- else
- nlwarning("command : unknown message name : '%s'", msgName.c_str());
+ // Create the message for the server to cancel the phrase being executed
+ const string msgName = "SENTENCE:CANCEL_CURRENT";
+ CBitMemStream out;
+ if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
+ {
+ NetMngr.push(out);
+ }
+ else
+ nlwarning("command : unknown message name : '%s'", msgName.c_str());
- return true;
+ return true;
}
NLMISC_COMMAND(cancelAllPhrases, "cancel all the phrases being executed", "")
{
- // no parameter needed
+ // no parameter needed
- UserEntity->cancelAllPhrases();
+ UserEntity->cancelAllPhrases();
- return true;
+ return true;
}
/*
-NLMISC_COMMAND(drop,"drop an item to the ground","")
-{
- if( args.size() < 1 )
- {
- return false;
- }
+ NLMISC_COMMAND(drop,"drop an item to the ground","")
+ {
+ if( args.size() < 1 )
+ {
+ return false;
+ }
- uint32 id;
- fromString(args[0], id);
- CEntityId itemId(RYZOMID::object,id);
+ uint32 id;
+ fromString(args[0], id);
+ CEntityId itemId(RYZOMID::object,id);
- sint32 x = (sint32)UserEntity->pos().x * 1000;
- sint32 y = (sint32)UserEntity->pos().y * 1000;
- sint32 z = (sint32)UserEntity->pos().z * 1000;
+ sint32 x = (sint32)UserEntity->pos().x * 1000;
+ sint32 y = (sint32)UserEntity->pos().y * 1000;
+ sint32 z = (sint32)UserEntity->pos().z * 1000;
- CBitMemStream bms;
- string msgType = "ITEM:DROP";
- if( GenericMsgHeaderMngr.pushNameToStream(msgType,bms) )
- {
- bms.serial( itemId );
- bms.serial( x );
- bms.serial( y );
- bms.serial( z );
- NetMngr.push( bms );
- nldebug(" sending 'ITEM:DROP' message to server");
- }
- else
- {
- nlwarning(" unknown message name : ITEM:DROP");
- }*
+ CBitMemStream bms;
+ string msgType = "ITEM:DROP";
+ if( GenericMsgHeaderMngr.pushNameToStream(msgType,bms) )
+ {
+ bms.serial( itemId );
+ bms.serial( x );
+ bms.serial( y );
+ bms.serial( z );
+ NetMngr.push( bms );
+ nldebug(" sending 'ITEM:DROP' message to server");
+ }
+ else
+ {
+ nlwarning(" unknown message name : ITEM:DROP");
+ }*
- return true;
-}
+ return true;
+ }
*/
NLMISC_COMMAND(pos, "Change the position of the user (in local only)", " OR 1 name of 'tp.teleport_list'. or a bot name")
{
- CVectorD newPos;
+ CVectorD newPos;
// Named destination.
if(args.size() == 1)
@@ -1900,1853 +1912,1854 @@ NLMISC_COMMAND(pos, "Change the position of the user (in local only)", " cause crash
- */
+ /*
+ CANNOT USE ProgressBar here, because it does pumpEvents(), and
+ ICommand::execute() is typically called from a pumpEvents() too...
+ => cause crash
+ */
- // Fade out the Game Sound
- if(SoundMngr)
- SoundMngr->fadeOutGameSound(ClientCfg.SoundTPFade);
+ // Fade out the Game Sound
+ if(SoundMngr)
+ SoundMngr->fadeOutGameSound(ClientCfg.SoundTPFade);
- // Remove the selection.
- UserEntity->selection(CLFECOMMON::INVALID_SLOT);
- // Remove the target.
- UserEntity->targetSlot(CLFECOMMON::INVALID_SLOT);
- // Change the position of the entity and in Pacs.
- UserEntity->pos(newPos);
- // Select the closest continent from the new position.
- CDummyProgress progress;
- ContinentMngr.select(newPos, progress);
- // Teleport the User.
- UserEntity->tp(newPos);
+ // Remove the selection.
+ UserEntity->selection(CLFECOMMON::INVALID_SLOT);
+ // Remove the target.
+ UserEntity->targetSlot(CLFECOMMON::INVALID_SLOT);
+ // Change the position of the entity and in Pacs.
+ UserEntity->pos(newPos);
+ // Select the closest continent from the new position.
+ CDummyProgress progress;
+ ContinentMngr.select(newPos, progress);
+ // Teleport the User.
+ UserEntity->tp(newPos);
- // First frame (for sound fade in)
- extern bool FirstFrame;
- FirstFrame = true;
+ // First frame (for sound fade in)
+ extern bool FirstFrame;
+ FirstFrame = true;
- return true;
+ return true;
}
NLMISC_COMMAND(removeEntity, "Remove an entity", "")
{
- if (args.size() != 1) return false;
- uint slot;
- fromString(args[0], slot);
- EntitiesMngr.remove(slot, true);
- return true;
+ if (args.size() != 1) return false;
+ uint slot;
+ fromString(args[0], slot);
+ EntitiesMngr.remove(slot, true);
+ return true;
}
NLMISC_COMMAND(entity, "Create an entity on the user or just remove it if Form not valid", "