diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-02-28 00:32:34 -0500 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-02-28 00:32:34 -0500 |
commit | b14a857e6b7ed99012d100a063b1b6cc07d140cb (patch) | |
tree | a17a9a35c70f029ef6a8a8e079d52b5f5683003f /trade.c | |
parent | added science to vp count; color to trades (diff) | |
download | 7w-b14a857e6b7ed99012d100a063b1b6cc07d140cb.tar.gz 7w-b14a857e6b7ed99012d100a063b1b6cc07d140cb.tar.bz2 7w-b14a857e6b7ed99012d100a063b1b6cc07d140cb.zip |
Correctly toggles
Diffstat (limited to 'trade.c')
-rw-r--r-- | trade.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -111,9 +111,6 @@ void trade_print(int x, int y, int player, int cursorx, int cursory) int trade_change(int cursorx, int cursory, int player, int change) { int forced = 0; - int p; - if(cursorx == 1) p = data_getwest(player); - else p = data_geteast(player); int *tradee = trade_gettradables(player, cursorx); if(tradebuffer[2][cursory]-1 < 0) { change = 1; @@ -128,7 +125,7 @@ int trade_change(int cursorx, int cursory, int player, int change) tradebuffer[2][cursory] += change; trade_addgold(player, get_trade(player, cursory, cursorx)*change*-1, cursorx); - if(tradebuffer[2][cursory] == 0 || tradee[cursory] == 0 || data_getgold(player) == 0) return change*-1; + if(tradebuffer[2][cursory] == 0 || data_getgold(player) == 0) return change*-1; return change; } |