-
Notifications
You must be signed in to change notification settings - Fork 214
bugfix: Sniper weapons can no longer fire upon empty Stinger Sites #2822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -604,6 +605,15 @@ Real WeaponTemplate::estimateWeaponTemplateDamage( | |
| if ( victimObj->getContain()->getContainCount() == 0 ) | ||
| return 0.0f; | ||
| } | ||
| #if !RETAIL_COMPATIBLE_CRC | ||
| else | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this correct? Are Contain and SpawnBehavior mutually exclusive always forever? Maybe check if Contain count + Slave count are zero?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should be too concerned about posterity here given the whole block ( The whole thing falls apart as soon as you attempt other configurations, e.g. having a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does it take to fix it properly with no hacking?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'd probably have to check whether the container encloses the occupants (i.e. in a similar way to how Propaganda can affect Fire Base occupants but not Bunker occupants) and then determine whether the armour of any of the occupants is > 0% for the respective weapon being used. But that'd be a bigger endeavour/refactor that is out of scope for this change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok maybe we can make the proper fix and then close this one.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incremental improvements are fine. |
||
| { | ||
| // 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 | ||
| } | ||
|
|
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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_BEHAVIORflagThe fix significantly increases the effectiveness of the sniper against GLA bases.
May need to be checked with The Counsel