Skip to content
Merged
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
18 changes: 10 additions & 8 deletions GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,14 +452,16 @@ void Player::init(const PlayerTemplate* pt)

if( m_money.countMoney() == 0 )
{
if ( TheGameInfo )
{
m_money = TheGameInfo->getStartingCash();
}
else
{
m_money = TheGlobalData->m_defaultStartingCash;
}
// TheSuperHacker @bugfix Now correctly deposits the money and fixes its audio and academy issues.
// Note that copying the entire Money class instead would also copy the player index inside of it.
if ( TheGameInfo )
{
m_money.deposit( TheGameInfo->getStartingCash().countMoney(), FALSE );
}
else
{
m_money.deposit( TheGlobalData->m_defaultStartingCash.countMoney(), FALSE );
}
}

m_playerDisplayName.clear();
Expand Down
Loading