Skip to content

Commit 16ad59d

Browse files
committed
fix uninitialized variables in weapon
1 parent 7e9db3c commit 16ad59d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ WeaponTemplate::WeaponTemplate() : m_nextTemplate(NULL)
349349
m_laserGroundUnitTargetHeight = 10; // Default Height offset
350350
m_scatterOnWaterSurface = false;
351351
m_historicDamageTriggerId = 0;
352+
m_resetFireBonesOnReload = false;
352353
}
353354

354355
//-------------------------------------------------------------------------------------------------
@@ -2229,8 +2230,6 @@ void Weapon::rebuildScatterTargets(Bool recenter/* = false*/)
22292230

22302231
m_scatterTargetsUnused.push_back(targetIndex);
22312232
}
2232-
// TODO: Crash
2233-
// Is there any need to fill up the rest of the targets?
22342233
}
22352234
else {
22362235
// When I reload, I need to rebuild the list of ScatterTargets to shoot at.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ void WeaponTemplateSet::clear()
112112
m_isReloadTimeShared = false;
113113
m_isWeaponLockSharedAcrossSets = FALSE;
114114
m_isWeaponReloadSharedAcrossSets = FALSE;
115+
m_isClipShared = false;
115116
m_types.clear();
116117
for (int i = 0; i < WEAPONSLOT_COUNT; ++i)
117118
{

0 commit comments

Comments
 (0)