Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class SpawnBehaviorInterface
virtual Bool areAllSlavesStealthed() const = 0;
virtual void revealSlaves() = 0;
virtual Bool doSlavesHaveFreedom() const = 0;
virtual Int getSlaveCount() const = 0;
};

// ------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -177,6 +178,7 @@ class SpawnBehavior : public UpdateModule,
virtual Bool areAllSlavesStealthed() const override;
virtual void revealSlaves() override;
virtual Bool doSlavesHaveFreedom() const override { return getSpawnBehaviorModuleData()->m_slavesHaveFreeWill; }
virtual Int getSlaveCount() const override { return m_spawnCount; }

// **********************************************************************************************
// our own methods
Expand Down
10 changes: 10 additions & 0 deletions GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#include "GameLogic/Module/AssistedTargetingUpdate.h"
#include "GameLogic/Module/ProjectileStreamUpdate.h"
#include "GameLogic/Module/PhysicsUpdate.h"
#include "GameLogic/Module/SpawnBehavior.h"
#include "GameLogic/TerrainLogic.h"

#define RATIONALIZE_ATTACK_RANGE
Expand Down Expand Up @@ -604,6 +605,15 @@ Real WeaponTemplate::estimateWeaponTemplateDamage(
if ( victimObj->getContain()->getContainCount() == 0 )
return 0.0f;
}
#if !RETAIL_COMPATIBLE_CRC

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may also need a PRESERVE_SNIPER_STINGER_BEHAVIOR flag
The fix significantly increases the effectiveness of the sniper against GLA bases.
May need to be checked with The Comity

else
{
// TheSuperHackers @bugfix Stubbjax 22/06/2026 Only allow targeting Stinger Sites when they contain Soldiers.
SpawnBehaviorInterface* spawnInterface = victimObj->getSpawnBehaviorInterface();
if (spawnInterface && spawnInterface->getSlaveCount() <= 0)
return 0.0f;
}
#endif
}


Expand Down
Loading