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 Dec 26, 2023
1 parent 6db700a commit 53c3ba3
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 @@ -74,7 +74,8 @@ RulesClassExtension::RulesClassExtension(const RulesClass *this_ptr) :
IsMPPrePlacedConYards(false),
IsBuildOffAlly(true),
IsShowSuperWeaponTimers(true),
IceStrength(0)
IceStrength(0),
ApproachTargetResetMultiplier(1.0)
{
//if (this_ptr) EXT_DEBUG_TRACE("RulesClassExtension::RulesClassExtension - 0x%08X\n", (uintptr_t)(ThisPtr));

Expand Down Expand Up @@ -433,6 +434,8 @@ bool RulesClassExtension::General(CCINIClass &ini)
*/
This()->EngineerDamage = ini.Get_Float(GENERAL, "EngineerDamage", This()->EngineerDamage);

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 @@ -97,4 +97,10 @@ class RulesClassExtension final : public GlobalExtensionClass<RulesClass>
* to break from a shot.
*/
int IceStrength;

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

0 comments on commit 53c3ba3

Please sign in to comment.