Restore network compatibility with RC1 broken by revision #52731
This commit is contained in:
parent
a73a64d93f
commit
3a4e8c47c3
2 changed files with 4 additions and 4 deletions
|
@ -98,7 +98,7 @@ move::move(config const& cfg, bool hidden)
|
|||
, fake_unit_hidden_(false)
|
||||
{
|
||||
// Construct and validate unit_
|
||||
unit_map::iterator unit_itor = resources::units->find(cfg["underlying_id"]);
|
||||
unit_map::iterator unit_itor = resources::units->find(cfg["unit_"]);
|
||||
if(unit_itor == resources::units->end())
|
||||
throw action::ctor_err("move: Invalid underlying_id");
|
||||
unit_underlying_id_ = unit_itor->underlying_id();
|
||||
|
@ -471,7 +471,7 @@ config move::to_config() const
|
|||
config final_cfg = action::to_config();
|
||||
|
||||
final_cfg["type"]="move";
|
||||
final_cfg["underlying_id"]=static_cast<int>(unit_underlying_id_);
|
||||
final_cfg["unit_"]=static_cast<int>(unit_underlying_id_);
|
||||
// final_cfg["movement_cost_"]=movement_cost_; //Unnecessary
|
||||
// final_cfg["unit_id_"]=unit_id_; //Unnecessary
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace wb
|
|||
, valid_(true)
|
||||
{
|
||||
// Construct and validate unit_
|
||||
unit_map::iterator unit_itor = resources::units->find(cfg["underlying_id"]);
|
||||
unit_map::iterator unit_itor = resources::units->find(cfg["unit_"]);
|
||||
if(unit_itor == resources::units->end())
|
||||
throw action::ctor_err("suppose_dead: Invalid underlying_id");
|
||||
|
||||
|
@ -163,7 +163,7 @@ namespace wb
|
|||
config final_cfg = action::to_config();
|
||||
|
||||
final_cfg["type"]="suppose_dead";
|
||||
final_cfg["underlying_id"]=static_cast<int>(unit_underlying_id_);
|
||||
final_cfg["unit_"]=static_cast<int>(unit_underlying_id_);
|
||||
final_cfg["unit_id_"]=unit_id_;
|
||||
|
||||
config loc_cfg;
|
||||
|
|
Loading…
Add table
Reference in a new issue