Make debug commands that create units use the currently controlled side
Instead of always creating units for side 1.
This commit is contained in:
parent
d526b75c86
commit
8889b5e3a0
2 changed files with 8 additions and 1 deletions
|
@ -1,6 +1,9 @@
|
|||
Version 1.12.6+dev:
|
||||
* Language and i18n:
|
||||
* Updated translations:
|
||||
* Miscellaneous and bug fixes:
|
||||
* Debug commands that create units now do so for the currently controlled
|
||||
side instead of always side 1.
|
||||
|
||||
Version 1.12.6:
|
||||
* Campaigns:
|
||||
|
|
|
@ -1066,7 +1066,11 @@ namespace { // Helpers for create_unit()
|
|||
unit_race::GENDER gender = unit_race::NUM_GENDERS)
|
||||
{
|
||||
// Create the unit.
|
||||
unit created(u_type, 1, true, gender);
|
||||
|
||||
const int side_num = resources::controller
|
||||
? resources::controller->current_side() : 1;
|
||||
|
||||
unit created(u_type, side_num, true, gender);
|
||||
created.new_turn();
|
||||
|
||||
// Add the unit to the board.
|
||||
|
|
Loading…
Add table
Reference in a new issue