aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-02-28 00:32:34 -0500
committerNathan Vance <nathav63@gmail.com>2015-02-28 00:32:34 -0500
commitb14a857e6b7ed99012d100a063b1b6cc07d140cb (patch)
treea17a9a35c70f029ef6a8a8e079d52b5f5683003f
parentadded science to vp count; color to trades (diff)
download7w-b14a857e6b7ed99012d100a063b1b6cc07d140cb.tar.gz
7w-b14a857e6b7ed99012d100a063b1b6cc07d140cb.tar.bz2
7w-b14a857e6b7ed99012d100a063b1b6cc07d140cb.zip
Correctly toggles
-rw-r--r--trade.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/trade.c b/trade.c
index 8e474bd..f5d8d60 100644
--- a/trade.c
+++ b/trade.c
@@ -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;
}
bgstack15