Commit 9d4f0455 authored by max's avatar max

fix swf loading

parent 01f80237
Pipeline #97984718 passed with stage
in 0 seconds
......@@ -90,7 +90,7 @@
<options>
<option showHiddenPaths="False" />
<option testMovie="Custom" />
<option testMovieCommand="..\..\..\..\utils\test.sh" />
<option testMovieCommand="..\..\utils\test.sh" />
</options>
<!-- Plugin storage -->
<storage />
......
......@@ -122,13 +122,13 @@ package com.xfw
{
var swfFileName:String = modsNames[modName];
if(swfFileName == null)
if(swfFileName == null)
{
DebugUtils.LOG_WARNING("[XFW/XfwComponent] loadMods: No SWF found for mod name " + modName);
continue
}
if (modsInfo.loaded != null && modsInfo.loaded.indexOf(swfFileName) >= 0)
if (modsInfo.loaded != null && modsInfo.loaded.indexOf(swfFileName) >= 0)
{
continue;
}
......@@ -195,7 +195,8 @@ package com.xfw
var swf:String = e.url.replace(/^.*\//, '');
_loadedUISWFs[swf] = e.loader ? XfwConst.SWF_LOADED : XfwConst.SWF_LOAD_ERROR;
if (modsList == null || modsList.length == 0 || modsList.indexOf(e.url.replace(/^..\/..\/res_mods\//i, "../../../../res_mods/")) < 0)
var fixedUrl:String = (e.url.search(/\/res_mods\//) >= 0 ? "../../" : "") + e.url;
if (modsList == null || modsList.length == 0 || modsList.indexOf(fixedUrl) < 0)
{
if (StringUtils.endsWith(swf.toLowerCase(), '_ui.swf'))
Xfw.cmd(XfwConst.XFW_COMMAND_SWF_LOADED, swf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment