-
Notifications
You must be signed in to change notification settings - Fork 167
Description
Prerequisites
- I have searched for similar issues and confirmed this is not a duplicate
Game Version
- Command & Conquer Generals
- Command & Conquer Generals: Zero Hour
- Other (please specify below)
Bug Description
The BattlePlanUpdate::setBattlePlan method, if the battle plan is set to PLANSTATUS_SEARCHANDDESTROY, can add a sight range bonus to eligible objects.
This is done in line 827 of BattlePlanUpdate.cpp:
obj->setShroudClearingRange( obj->getShroudClearingRange() * data->m_strategyCenterSearchAndDestroySightRangeScalar );
The Object::getShroudClearingRange() method has a condition where if the object is under construction, instead of using the ShroudClearingRange parameter defined in the Object's INI code, it will instead take the building's geometry and add the bonus to it, then set that as the new shroud clearing radius. The original intent of this, most likely, was to prevent scaffold abuse for scouting with their normal shroud clearing range:
if( getStatusBits().test( OBJECT_STATUS_UNDER_CONSTRUCTION ) )
{
//structures under construction have limited vision range. For now, base it
//on the geometry extents so the structure can only see itself.
shroudClearingRange = getGeometryInfo().getBoundingCircleRadius();
}
However, if Search & Destroy is modified to affect USA defences, for example, any defence built while the plan is active will have permanently crippled shroud clearing range. Changing the plans does not fix the issue:
Reproduction Steps
- Modify the Strategy Center's BattlePlanUpdate module to remove STRUCTURES from
InvalidMemberKindOflist. - Build Strategy Center and activate Search & Destroy
- Build defence or building with shroud clearing range.
Additional Context
No response