Fix wesnoth.set_village_owner ignoring the fire_event parameter
Looks like this was lost in the refactor that introduced the luaW_checklocation helper function. If the location is specified as two separate parameters for x and y, this helper function actually pops the y parameter from the stack so that further parameter tests can act as if the location was a single parameter. Thus, the fire_event parameter, which used to be 4th on the stack, is now moved down to 3rd.
This commit is contained in:
parent
1196225017
commit
0dfb390a84
1 changed files with 1 additions and 1 deletions
|
@ -1178,7 +1178,7 @@ int game_lua_kernel::intf_set_village_owner(lua_State *L)
|
|||
|
||||
// If the new side was valid, re-assign the village.
|
||||
if(new_side) {
|
||||
new_side->get_village(loc, old_side_num, (luaW_toboolean(L, 4) ? &gamedata() : nullptr));
|
||||
new_side->get_village(loc, old_side_num, (luaW_toboolean(L, 3) ? &gamedata() : nullptr));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue