Skip to content

Commit bc50362

Browse files
committed
perf: Only trim old historic damage for historic weapons
1 parent a127604 commit bc50362

File tree

2 files changed

+4
-4
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object
  • Generals/Code/GameEngine/Source/GameLogic/Object

2 files changed

+4
-4
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,10 +1130,10 @@ void WeaponTemplate::processHistoricDamage(const Object* source, const Coord3D*
11301130
// firestorms (CBD) */
11311131
//
11321132

1133-
trimOldHistoricDamage();
1134-
11351133
if( m_historicBonusCount > 0 && m_historicBonusWeapon != this )
11361134
{
1135+
trimOldHistoricDamage();
1136+
11371137
Real radSqr = m_historicBonusRadius * m_historicBonusRadius;
11381138
Int count = 0;
11391139
UnsignedInt frameNow = TheGameLogic->getFrame();

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,10 +1208,10 @@ void WeaponTemplate::processHistoricDamage(const Object* source, const Coord3D*
12081208
// firestorms (CBD) */
12091209
//
12101210

1211-
trimOldHistoricDamage();
1212-
12131211
if( m_historicBonusCount > 0 && m_historicBonusWeapon != this )
12141212
{
1213+
trimOldHistoricDamage();
1214+
12151215
Real radSqr = m_historicBonusRadius * m_historicBonusRadius;
12161216
Int count = 0;
12171217
UnsignedInt frameNow = TheGameLogic->getFrame();

0 commit comments

Comments
 (0)