File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
GeneralsMD/Code/GameEngine/Source/Common/RTS
Generals/Code/GameEngine/Source/Common/RTS Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 48
48
#include " Common/GameAudio.h"
49
49
#include " Common/MiscAudio.h"
50
50
#include " Common/Player.h"
51
+ #include " Common/PlayerList.h"
51
52
#include " Common/Xfer.h"
52
53
53
54
// ------------------------------------------------------------------------------------------------
54
55
UnsignedInt Money::withdraw (UnsignedInt amountToWithdraw, Bool playSound)
55
56
{
57
+ #if defined(RTS_DEBUG)
58
+ Player* player = ThePlayerList->getNthPlayer (m_playerIndex);
59
+ if (player != NULL && player->buildsForFree ())
60
+ return 0 ;
61
+ #endif
62
+
56
63
if (amountToWithdraw > m_money)
57
64
amountToWithdraw = m_money;
58
65
Original file line number Diff line number Diff line change 54
54
// ------------------------------------------------------------------------------------------------
55
55
UnsignedInt Money::withdraw (UnsignedInt amountToWithdraw, Bool playSound)
56
56
{
57
+ #if defined(RTS_DEBUG)
58
+ Player* player = ThePlayerList->getNthPlayer (m_playerIndex);
59
+ if (player != NULL && player->buildsForFree ())
60
+ return 0 ;
61
+ #endif
62
+
57
63
if (amountToWithdraw > m_money)
58
64
amountToWithdraw = m_money;
59
65
You can’t perform that action at this time.
0 commit comments