-
Notifications
You must be signed in to change notification settings - Fork 84
[GEN][ZH] Fix nationalism and fanaticism bonuses being applied independent of horde status #385
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 1 commit
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 |
---|---|---|
|
@@ -4466,20 +4466,24 @@ void AIUpdateInterface::evaluateMoraleBonus( void ) | |
//if ( draw && !us->isKindOf( KINDOF_PORTABLE_STRUCTURE ) ) | ||
// draw->setTerrainDecal(TERRAIN_DECAL_NONE); | ||
|
||
// TheSuperHackers @bugfix @GeneralCamo 06/03/2025 Corrected nationalism being applied regardless of horde status - issue #173 | ||
Generalcamo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// horde | ||
if( horde ) | ||
{ | ||
if ( horde ) { | ||
us->setWeaponBonusCondition( WEAPONBONUSCONDITION_HORDE ); | ||
|
||
} // end if | ||
else | ||
// nationalism | ||
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. This needs wrapping in a conditional block so we can merge the fix into the codebase while maintaining compatibility for now, in the future we can remove the compatibility and the fix will be in the code. #if !RETAIL_COMPATIBLE_CRC
fixed nationalism code here
#endif block |
||
if (nationalism) { | ||
us->setWeaponBonusCondition( WEAPONBONUSCONDITION_NATIONALISM ); | ||
} | ||
else { | ||
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_NATIONALISM ); | ||
} | ||
} | ||
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. The original nationalism code block needs putting back and wrapping in a #if RETAIL_COMPATIBLE_CRC
original nationalism code
#endif block |
||
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_HORDE ); | ||
|
||
// nationalism | ||
if( nationalism ) | ||
us->setWeaponBonusCondition( WEAPONBONUSCONDITION_NATIONALISM ); | ||
else | ||
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_NATIONALISM ); | ||
} | ||
// end @bugfix | ||
|
||
} // end if | ||
#ifdef ALLOW_DEMORALIZE | ||
|
Uh oh!
There was an error while loading. Please reload this page.