Commit 53c6e818 authored by nanahira's avatar nanahira

fix preload non-loaded

parent 1143a24d
...@@ -66,6 +66,10 @@ extern "C" DECL_DLLEXPORT intptr_t create_duel(uint_fast32_t seed) { ...@@ -66,6 +66,10 @@ extern "C" DECL_DLLEXPORT intptr_t create_duel(uint_fast32_t seed) {
} }
extern "C" DECL_DLLEXPORT void start_duel(intptr_t pduel, int32 options) { extern "C" DECL_DLLEXPORT void start_duel(intptr_t pduel, int32 options) {
duel* pd = (duel*)pduel; duel* pd = (duel*)pduel;
if(!pd->lua->preloaded) {
pd->lua->preloaded = TRUE;
pd->lua->call_code_function(0, (char*) "PreloadUds", 0, 0);
}
pd->game_field->core.duel_options |= options & 0xffff; pd->game_field->core.duel_options |= options & 0xffff;
int32 duel_rule = options >> 16; int32 duel_rule = options >> 16;
if(duel_rule) if(duel_rule)
......
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