Skip to content
Merged
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
7 changes: 4 additions & 3 deletions Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,11 @@ Object::Object( const ThingTemplate *tt, const ObjectStatusMaskType &objectStatu
m_soleHealingBenefactorID = INVALID_ID; ///< who is the only other object that can give me this non-stacking heal benefit?
m_soleHealingBenefactorExpirationFrame = 0; ///< on what frame can I accept healing (thus to switch) from a new benefactor

// TheSuperHackers @bugfix Mauller/xezon 02/08/2025 sendObjectCreated needs calling before CreateModule's are initialized to prevent drawable related crashes
// This predominantly occurs with the veterancy create module when the chemical suits upgrade is unlocked as it tries to set the terrain decal.

// emit message announcing object's creation
TheGameLogic->sendObjectCreated( this );

} // end Object

Expand All @@ -455,9 +459,6 @@ void Object::initObject()
// If I have a valid team assigned, I can run through my Upgrade modules with his flags
updateUpgradeModules();

// emit message announcing object's creation
TheGameLogic->sendObjectCreated( this );

//If the player has battle plans (America Strategy Center), then apply those bonuses
//to this object if applicable. Internally it validates certain kinds of objects.
const Player* controller = getControllingPlayer();
Expand Down
7 changes: 4 additions & 3 deletions GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,11 @@ Object::Object( const ThingTemplate *tt, const ObjectStatusMaskType &objectStatu
m_soleHealingBenefactorID = INVALID_ID; ///< who is the only other object that can give me this non-stacking heal benefit?
m_soleHealingBenefactorExpirationFrame = 0; ///< on what frame can I accept healing (thus to switch) from a new benefactor

// TheSuperHackers @bugfix Mauller/xezon 02/08/2025 sendObjectCreated needs calling before CreateModule's are initialized to prevent drawable related crashes
// This predominantly occurs with the veterancy create module when the chemical suits upgrade is unlocked as it tries to set the terrain decal.

// emit message announcing object's creation
TheGameLogic->sendObjectCreated( this );

} // end Object

Expand All @@ -524,9 +528,6 @@ void Object::initObject()
for (int i = 0; i < WEAPONSLOT_COUNT; ++i)
m_lastWeaponCondition[i] = WSF_INVALID;

// emit message announcing object's creation
TheGameLogic->sendObjectCreated( this );

// If I have a valid team assigned, I can run through my Upgrade modules with his flags
updateUpgradeModules();

Expand Down
Loading