Skip to content

Commit

Permalink
Adds ApproachTargetResetMultiplier to RulesClass.
Browse files Browse the repository at this point in the history
  • Loading branch information
CCHyper committed Oct 20, 2021
1 parent b9059bf commit bb93481
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/extensions/rules/rulesext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ RulesClassExtension::RulesClassExtension(RulesClass *this_ptr) :
Extension(this_ptr),
IsMPAutoDeployMCV(false),
IsMPPrePlacedConYards(false),
IsBuildOffAlly(true)
IsBuildOffAlly(true),
ApproachTargetResetMultiplier(1.0)
{
ASSERT(ThisPtr != nullptr);
//EXT_DEBUG_TRACE("RulesClassExtension constructor - 0x%08X\n", (uintptr_t)(ThisPtr));
Expand Down Expand Up @@ -204,6 +205,8 @@ bool RulesClassExtension::General(CCINIClass &ini)
return false;
}

ApproachTargetResetMultiplier = ini.Get_Float(GENERAL, "ApproachTargetResetMultiplier", ApproachTargetResetMultiplier);

return true;
}

Expand Down
6 changes: 6 additions & 0 deletions src/extensions/rules/rulesext.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ class RulesClassExtension final : public Extension<RulesClass>
* Can players build their own structures adjacent to structures owned by their allies?
*/
bool IsBuildOffAlly;

/**
* The "approach target" position should be recalculated if the target is
* now more than weapon range times this value.
*/
double ApproachTargetResetMultiplier;
};


Expand Down

0 comments on commit bb93481

Please sign in to comment.