Commit 25904104 authored by VanillaSalt's avatar VanillaSalt

update

parent c49a463f
...@@ -70,8 +70,11 @@ extern "C" DECL_DLLEXPORT ptr create_duel(uint32 seed) { ...@@ -70,8 +70,11 @@ extern "C" DECL_DLLEXPORT ptr create_duel(uint32 seed) {
} }
extern "C" DECL_DLLEXPORT void start_duel(ptr pduel, int options) { extern "C" DECL_DLLEXPORT void start_duel(ptr pduel, int options) {
duel* pd = (duel*)pduel; duel* pd = (duel*)pduel;
pd->game_field->core.duel_options |= options; pd->game_field->core.duel_options |= options & 0xffff;
if(options & DUEL_OBSOLETE_RULING) int32 duel_rule = options >> 16;
if(duel_rule)
pd->game_field->core.duel_rule = duel_rule;
else if(options & DUEL_OBSOLETE_RULING) //provide backward compatibility with replay
pd->game_field->core.duel_rule = 1; pd->game_field->core.duel_rule = 1;
else else
pd->game_field->core.duel_rule = 3; pd->game_field->core.duel_rule = 3;
......
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