File tree Expand file tree Collapse file tree 2 files changed +20
-16
lines changed
GeneralsMD/Code/GameEngine/Source/Common/RTS
Generals/Code/GameEngine/Source/Common/RTS Expand file tree Collapse file tree 2 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,14 @@ UnsignedInt Money::withdraw(UnsignedInt amountToWithdraw, Bool playSound)
59
59
if (amountToWithdraw == 0 )
60
60
return amountToWithdraw;
61
61
62
- // @todo: Do we do this frequently enough that it is a performance hit?
63
- AudioEventRTS event = TheAudio->getMiscAudio ()->m_moneyWithdrawSound ;
64
- event.setPlayerIndex (m_playerIndex);
65
-
66
62
// Play a sound
67
63
if (playSound)
64
+ {
65
+ // @todo: Do we do this frequently enough that it is a performance hit?
66
+ AudioEventRTS event = TheAudio->getMiscAudio ()->m_moneyWithdrawSound ;
67
+ event.setPlayerIndex (m_playerIndex);
68
68
TheAudio->addAudioEvent (&event);
69
+ }
69
70
70
71
m_money -= amountToWithdraw;
71
72
@@ -78,13 +79,14 @@ void Money::deposit(UnsignedInt amountToDeposit, Bool playSound)
78
79
if (amountToDeposit == 0 )
79
80
return ;
80
81
81
- // @todo: Do we do this frequently enough that it is a performance hit?
82
- AudioEventRTS event = TheAudio->getMiscAudio ()->m_moneyDepositSound ;
83
- event.setPlayerIndex (m_playerIndex);
84
-
85
82
// Play a sound
86
83
if (playSound)
84
+ {
85
+ // @todo: Do we do this frequently enough that it is a performance hit?
86
+ AudioEventRTS event = TheAudio->getMiscAudio ()->m_moneyDepositSound ;
87
+ event.setPlayerIndex (m_playerIndex);
87
88
TheAudio->addAudioEvent (&event);
89
+ }
88
90
89
91
m_money += amountToDeposit;
90
92
}
Original file line number Diff line number Diff line change @@ -60,13 +60,14 @@ UnsignedInt Money::withdraw(UnsignedInt amountToWithdraw, Bool playSound)
60
60
if (amountToWithdraw == 0 )
61
61
return amountToWithdraw;
62
62
63
- // @todo: Do we do this frequently enough that it is a performance hit?
64
- AudioEventRTS event = TheAudio->getMiscAudio ()->m_moneyWithdrawSound ;
65
- event.setPlayerIndex (m_playerIndex);
66
-
67
63
// Play a sound
68
64
if (playSound)
65
+ {
66
+ // @todo: Do we do this frequently enough that it is a performance hit?
67
+ AudioEventRTS event = TheAudio->getMiscAudio ()->m_moneyWithdrawSound ;
68
+ event.setPlayerIndex (m_playerIndex);
69
69
TheAudio->addAudioEvent (&event);
70
+ }
70
71
71
72
m_money -= amountToWithdraw;
72
73
@@ -79,13 +80,14 @@ void Money::deposit(UnsignedInt amountToDeposit, Bool playSound)
79
80
if (amountToDeposit == 0 )
80
81
return ;
81
82
82
- // @todo: Do we do this frequently enough that it is a performance hit?
83
- AudioEventRTS event = TheAudio->getMiscAudio ()->m_moneyDepositSound ;
84
- event.setPlayerIndex (m_playerIndex);
85
-
86
83
// Play a sound
87
84
if (playSound)
85
+ {
86
+ // @todo: Do we do this frequently enough that it is a performance hit?
87
+ AudioEventRTS event = TheAudio->getMiscAudio ()->m_moneyDepositSound ;
88
+ event.setPlayerIndex (m_playerIndex);
88
89
TheAudio->addAudioEvent (&event);
90
+ }
89
91
90
92
m_money += amountToDeposit;
91
93
You can’t perform that action at this time.
0 commit comments