Changeset - r5660:248b3a88d9bf
[Not reviewed]
master
0 1 0
peter1138 - 18 years ago 2007-01-14 18:38:40
peter1138@openttd.org
(svn r8120) -Fix (r8055): Station cargo waiting value clamp should be signed not unsigned. This resulted in cargo magically appearing...
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -2524,8 +2524,8 @@ static void UpdateStationRating(Station 
 
				// if rating is <= 127 and there are any items waiting, maybe remove some goods.
 
				if (rating <= 127 && waiting != 0) {
 
					uint32 r = Random();
 
					if ( (uint)rating <= (r & 0x7F) ) {
 
						waiting = max(waiting - ((r >> 8)&3) - 1, 0U);
 
					if (rating <= (int)GB(r, 0, 7)) {
 
						waiting = max(waiting - (int)GB(r, 8, 2) - 1, 0);
 
						waiting_changed = true;
 
					}
 
				}
0 comments (0 inline, 0 general)