Commit fe3d19a2 authored by nanahira's avatar nanahira

fix loading init.lua

parent 5c2436b3
......@@ -157,6 +157,7 @@ bool ReplayMode::StartDuel() {
}
pduel = create_duel(rnd.rand());
preload_script(pduel, "./script/special.lua", 0);
preload_script(pduel, "./script/init.lua", 0);
int start_lp = cur_replay.ReadInt32();
int start_hand = cur_replay.ReadInt32();
int draw_count = cur_replay.ReadInt32();
......
......@@ -414,6 +414,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
rnd.reset(seed);
pduel = create_duel(rnd.rand());
preload_script(pduel, "./script/special.lua", 0);
preload_script(pduel, "./script/init.lua", 0);
set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count);
set_player_info(pduel, 1, host_info.start_lp, host_info.start_hand, host_info.draw_count);
int opt = (int)host_info.duel_rule << 16;
......
......@@ -43,6 +43,7 @@ int SingleMode::SinglePlayThread(void* param) {
set_message_handler((message_handler)MessageHandler);
pduel = create_duel(rnd.rand());
preload_script(pduel, "./script/special.lua", 0);
preload_script(pduel, "./script/init.lua", 0);
set_player_info(pduel, 0, start_lp, start_hand, draw_count);
set_player_info(pduel, 1, start_lp, start_hand, draw_count);
mainGame->dInfo.lp[0] = start_lp;
......
......@@ -389,6 +389,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
rnd.reset(seed);
pduel = create_duel(rnd.rand());
preload_script(pduel, "./script/special.lua", 0);
preload_script(pduel, "./script/init.lua", 0);
set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count);
set_player_info(pduel, 1, host_info.start_lp, host_info.start_hand, host_info.draw_count);
int opt = (int)host_info.duel_rule << 16;
......
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