Commit 4f2720fe authored by nanahira's avatar nanahira

load extra scripts in gframe

parent d4c66b2e
...@@ -156,6 +156,7 @@ bool ReplayMode::StartDuel() { ...@@ -156,6 +156,7 @@ bool ReplayMode::StartDuel() {
cur_replay.ReadName(mainGame->dInfo.clientname); cur_replay.ReadName(mainGame->dInfo.clientname);
} }
pduel = create_duel(rnd.rand()); pduel = create_duel(rnd.rand());
preload_script(pduel, "./script/special.lua", 0);
int start_lp = cur_replay.ReadInt32(); int start_lp = cur_replay.ReadInt32();
int start_hand = cur_replay.ReadInt32(); int start_hand = cur_replay.ReadInt32();
int draw_count = cur_replay.ReadInt32(); int draw_count = cur_replay.ReadInt32();
......
...@@ -413,6 +413,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { ...@@ -413,6 +413,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
set_message_handler((message_handler)SingleDuel::MessageHandler); set_message_handler((message_handler)SingleDuel::MessageHandler);
rnd.reset(seed); rnd.reset(seed);
pduel = create_duel(rnd.rand()); pduel = create_duel(rnd.rand());
preload_script(pduel, "./script/special.lua", 0);
set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count); 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); 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; int opt = (int)host_info.duel_rule << 16;
......
...@@ -42,6 +42,7 @@ int SingleMode::SinglePlayThread(void* param) { ...@@ -42,6 +42,7 @@ int SingleMode::SinglePlayThread(void* param) {
set_card_reader((card_reader)DataManager::CardReader); set_card_reader((card_reader)DataManager::CardReader);
set_message_handler((message_handler)MessageHandler); set_message_handler((message_handler)MessageHandler);
pduel = create_duel(rnd.rand()); pduel = create_duel(rnd.rand());
preload_script(pduel, "./script/special.lua", 0);
set_player_info(pduel, 0, start_lp, start_hand, draw_count); set_player_info(pduel, 0, start_lp, start_hand, draw_count);
set_player_info(pduel, 1, start_lp, start_hand, draw_count); set_player_info(pduel, 1, start_lp, start_hand, draw_count);
mainGame->dInfo.lp[0] = start_lp; mainGame->dInfo.lp[0] = start_lp;
......
...@@ -388,6 +388,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { ...@@ -388,6 +388,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
set_message_handler((message_handler)TagDuel::MessageHandler); set_message_handler((message_handler)TagDuel::MessageHandler);
rnd.reset(seed); rnd.reset(seed);
pduel = create_duel(rnd.rand()); pduel = create_duel(rnd.rand());
preload_script(pduel, "./script/special.lua", 0);
set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count); 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); 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; int opt = (int)host_info.duel_rule << 16;
......
Subproject commit 74dfabcae52037dc09e5340b76985c90d45d5973 Subproject commit e4cd79bf91cc524451fbaae30009b3740966b1bb
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