mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 18:12:31 +00:00
remove dead code.
player_cfg_ was always NULL.
This commit is contained in:
parent
1a7d358e39
commit
881e2da2d1
@ -337,7 +337,6 @@ public:
|
|||||||
, leader_configs_()
|
, leader_configs_()
|
||||||
, level_(level)
|
, level_(level)
|
||||||
, map_(map)
|
, map_(map)
|
||||||
, player_cfg_(NULL)
|
|
||||||
, player_exists_(false)
|
, player_exists_(false)
|
||||||
, save_id_(save_id)
|
, save_id_(save_id)
|
||||||
, seen_ids_()
|
, seen_ids_()
|
||||||
@ -394,7 +393,6 @@ protected:
|
|||||||
std::deque<config> leader_configs_;
|
std::deque<config> leader_configs_;
|
||||||
const config &level_;
|
const config &level_;
|
||||||
gamemap &map_;
|
gamemap &map_;
|
||||||
const config *player_cfg_;
|
|
||||||
bool player_exists_;
|
bool player_exists_;
|
||||||
const std::string save_id_;
|
const std::string save_id_;
|
||||||
std::set<std::string> seen_ids_;
|
std::set<std::string> seen_ids_;
|
||||||
@ -433,7 +431,6 @@ protected:
|
|||||||
|
|
||||||
log_step("init");
|
log_step("init");
|
||||||
|
|
||||||
player_cfg_ = NULL;
|
|
||||||
//track whether a [player] tag with persistence information exists (in addition to the [side] tag)
|
//track whether a [player] tag with persistence information exists (in addition to the [side] tag)
|
||||||
player_exists_ = false;
|
player_exists_ = false;
|
||||||
|
|
||||||
@ -450,11 +447,6 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool use_player_cfg() const
|
|
||||||
{
|
|
||||||
return (player_cfg_ != NULL) && (!snapshot_);
|
|
||||||
}
|
|
||||||
|
|
||||||
void gold()
|
void gold()
|
||||||
{
|
{
|
||||||
log_step("gold");
|
log_step("gold");
|
||||||
@ -585,23 +577,15 @@ protected:
|
|||||||
|
|
||||||
void prepare_units()
|
void prepare_units()
|
||||||
{
|
{
|
||||||
log_step("prepare units");
|
//if this is a start-of-scenario save then playcampaign.cpp merged
|
||||||
if (use_player_cfg()) {
|
//units in [replay_start][side] merged with [side] already
|
||||||
//units in [replay_start][side] merged with [side]
|
//units that are in '[scenario][side]' are 'first'
|
||||||
//only relevant in start-of-scenario saves, that's why !shapshot
|
|
||||||
//units that are in '[scenario][side]' are 'first'
|
//for create-or-recall semantics to work: for each unit with non-empty
|
||||||
//for create-or-recall semantics to work: for each unit with non-empty
|
//id, unconditionally put OTHER, later, units with same id directly to
|
||||||
//id, unconditionally put OTHER, later, units with same id directly to
|
//recall list, not including them in unit_configs_
|
||||||
//recall list, not including them in unit_configs_
|
BOOST_FOREACH(const config &su, side_cfg_.child_range("unit")) {
|
||||||
BOOST_FOREACH(const config &u, (*player_cfg_).child_range("unit")) {
|
handle_unit(su, "side_cfg");
|
||||||
handle_unit(u,"player_cfg");
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
//units in [side]
|
|
||||||
BOOST_FOREACH(const config &su, side_cfg_.child_range("unit")) {
|
|
||||||
handle_unit(su, "side_cfg");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user