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 Sep 22, 2022
1 parent 4923120 commit 5c094ae
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 @@ -48,7 +48,8 @@ RulesClassExtension::RulesClassExtension(RulesClass *this_ptr) :
IsMPAutoDeployMCV(false),
IsMPPrePlacedConYards(false),
IsBuildOffAlly(true),
IsShowSuperWeaponTimers(true)
IsShowSuperWeaponTimers(true),
ApproachTargetResetMultiplier(1.0)
{
ASSERT(ThisPtr != nullptr);
//EXT_DEBUG_TRACE("RulesClassExtension constructor - 0x%08X\n", (uintptr_t)(ThisPtr));
Expand Down Expand Up @@ -291,6 +292,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 @@ -110,6 +110,12 @@ class RulesClassExtension final : public Extension<RulesClass>
* on the tactical view?
*/
bool IsShowSuperWeaponTimers;

/**
* 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 5c094ae

Please sign in to comment.