|
@@ -60,15 +60,16 @@ INSTANTIATE_POOL_METHODS(Company)
|
|
|
*/
|
|
|
Company::Company(uint16 name_1, bool is_ai)
|
|
|
{
|
|
|
this->name_1 = name_1;
|
|
|
this->location_of_HQ = INVALID_TILE;
|
|
|
this->is_ai = is_ai;
|
|
|
this->terraform_limit = (uint32)_settings_game.construction.terraform_frame_burst << 16;
|
|
|
this->clear_limit = (uint32)_settings_game.construction.clear_frame_burst << 16;
|
|
|
this->tree_limit = (uint32)_settings_game.construction.tree_frame_burst << 16;
|
|
|
this->terraform_limit = (uint32)_settings_game.construction.terraform_frame_burst << 16;
|
|
|
this->clear_limit = (uint32)_settings_game.construction.clear_frame_burst << 16;
|
|
|
this->tree_limit = (uint32)_settings_game.construction.tree_frame_burst << 16;
|
|
|
this->build_object_limit = (uint32)_settings_game.construction.build_object_frame_burst << 16;
|
|
|
|
|
|
std::fill(this->share_owners.begin(), this->share_owners.end(), INVALID_OWNER);
|
|
|
InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, INVALID_COMPANY);
|
|
|
}
|
|
|
|
|
|
/** Destructor. */
|
|
@@ -264,15 +265,16 @@ void SubtractMoneyFromCompanyFract(Compa
|
|
|
}
|
|
|
|
|
|
/** Update the landscaping limits per company. */
|
|
|
void UpdateLandscapingLimits()
|
|
|
{
|
|
|
for (Company *c : Company::Iterate()) {
|
|
|
c->terraform_limit = std::min<uint64>((uint64)c->terraform_limit + _settings_game.construction.terraform_per_64k_frames, (uint64)_settings_game.construction.terraform_frame_burst << 16);
|
|
|
c->clear_limit = std::min<uint64>((uint64)c->clear_limit + _settings_game.construction.clear_per_64k_frames, (uint64)_settings_game.construction.clear_frame_burst << 16);
|
|
|
c->tree_limit = std::min<uint64>((uint64)c->tree_limit + _settings_game.construction.tree_per_64k_frames, (uint64)_settings_game.construction.tree_frame_burst << 16);
|
|
|
c->terraform_limit = std::min<uint64>((uint64)c->terraform_limit + _settings_game.construction.terraform_per_64k_frames, (uint64)_settings_game.construction.terraform_frame_burst << 16);
|
|
|
c->clear_limit = std::min<uint64>((uint64)c->clear_limit + _settings_game.construction.clear_per_64k_frames, (uint64)_settings_game.construction.clear_frame_burst << 16);
|
|
|
c->tree_limit = std::min<uint64>((uint64)c->tree_limit + _settings_game.construction.tree_per_64k_frames, (uint64)_settings_game.construction.tree_frame_burst << 16);
|
|
|
c->build_object_limit = std::min<uint64>((uint64)c->build_object_limit + _settings_game.construction.build_object_per_64k_frames, (uint64)_settings_game.construction.build_object_frame_burst << 16);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Set the right DParams to get the name of an owner.
|
|
|
* @param owner the owner to get the name of.
|