Fix build.

develop
Alexander Gavrilov 2012-10-03 12:58:05 +04:00
parent 33aead34b4
commit 9f687f64a4
2 changed files with 8 additions and 5 deletions

@ -1 +1 @@
Subproject commit 4c210ddb5338d3a519d03f768da828c33480e4fe Subproject commit 20c6d9c743f1c5a20bb288f427b101e9b2a138d7

@ -30,6 +30,7 @@
#include "df/viewscreen_optionst.h" #include "df/viewscreen_optionst.h"
#include "df/viewscreen_dungeonmodest.h" #include "df/viewscreen_dungeonmodest.h"
#include "df/viewscreen_dungeon_monsterstatusst.h" #include "df/viewscreen_dungeon_monsterstatusst.h"
#include "df/nemesis_flags.h"
#include <math.h> #include <math.h>
@ -683,17 +684,19 @@ command_result adv_bodyswap (color_ostream &out, std::vector <std::string> & par
// Permanently re-link everything // Permanently re-link everything
if (permanent) if (permanent)
{ {
using namespace df::enums::nemesis_flags;
ui_advmode->player_id = linear_index(world->nemesis.all, new_nemesis); ui_advmode->player_id = linear_index(world->nemesis.all, new_nemesis);
// Flag 0 appears to be the 'active adventurer' flag, and // Flag 0 appears to be the 'active adventurer' flag, and
// the player_id field above seems to be computed using it // the player_id field above seems to be computed using it
// when a savegame is loaded. // when a savegame is loaded.
// Also, unless this is set, it is impossible to retire. // Also, unless this is set, it is impossible to retire.
real_nemesis->flags.set(0, false); real_nemesis->flags.set(ACTIVE_ADVENTURER, false);
new_nemesis->flags.set(0, true); new_nemesis->flags.set(ACTIVE_ADVENTURER, true);
real_nemesis->flags.set(1, true); // former retired adventurer real_nemesis->flags.set(RETIRED_ADVENTURER, true); // former retired adventurer
new_nemesis->flags.set(2, true); // blue color in legends new_nemesis->flags.set(ADVENTURER, true); // blue color in legends
// Reassign companions and acquaintances // Reassign companions and acquaintances
if (!no_make_leader) if (!no_make_leader)