Changeset - r13038:d42de8c3636a
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-09-15 17:23:24
rubidium@openttd.org
(svn r17546) -Fix (r9617): sign extending of profit calculation didn't work
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -815,7 +815,7 @@ Money GetTransportedGoodsIncome(uint num
 
			int result = GB(callback, 0, 14);
 

	
 
			/* Simulate a 15 bit signed value */
 
			if (HasBit(callback, 14)) result = 0x4000 - result;
 
			if (HasBit(callback, 14)) result -= 0x4000;
 

	
 
			/* "The result should be a signed multiplier that gets multiplied
 
			 * by the amount of cargo moved and the price factor, then gets
0 comments (0 inline, 0 general)