Commit cc9497b7 authored by Chen Bill's avatar Chen Bill Committed by GitHub

ocgapi change: preload_script (#2601)

parent 132e5277
...@@ -234,7 +234,7 @@ bool ReplayMode::StartDuel() { ...@@ -234,7 +234,7 @@ bool ReplayMode::StartDuel() {
} }
cur_replay.ReadData(filename, slen); cur_replay.ReadData(filename, slen);
filename[slen] = 0; filename[slen] = 0;
if(!preload_script(pduel, filename, 0)) { if(!preload_script(pduel, filename)) {
return false; return false;
} }
} }
......
...@@ -60,11 +60,11 @@ int SingleMode::SinglePlayThread() { ...@@ -60,11 +60,11 @@ int SingleMode::SinglePlayThread() {
if(open_file) { if(open_file) {
open_file = false; open_file = false;
slen = BufferIO::EncodeUTF8(open_file_name, filename); slen = BufferIO::EncodeUTF8(open_file_name, filename);
if(!preload_script(pduel, filename, 0)) { if(!preload_script(pduel, filename)) {
wchar_t fname[256]; wchar_t fname[256];
myswprintf(fname, L"./single/%ls", open_file_name); myswprintf(fname, L"./single/%ls", open_file_name);
slen = BufferIO::EncodeUTF8(fname, filename); slen = BufferIO::EncodeUTF8(fname, filename);
if(!preload_script(pduel, filename, 0)) if(!preload_script(pduel, filename))
slen = 0; slen = 0;
} }
} else { } else {
...@@ -72,7 +72,7 @@ int SingleMode::SinglePlayThread() { ...@@ -72,7 +72,7 @@ int SingleMode::SinglePlayThread() {
wchar_t fname[256]; wchar_t fname[256];
myswprintf(fname, L"./single/%ls", name); myswprintf(fname, L"./single/%ls", name);
slen = BufferIO::EncodeUTF8(fname, filename); slen = BufferIO::EncodeUTF8(fname, filename);
if(!preload_script(pduel, filename, 0)) if(!preload_script(pduel, filename))
slen = 0; slen = 0;
} }
if(slen == 0) { if(slen == 0) {
......
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