Fuel give-away bug fixed, from BlckKnght.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@307 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2002-12-04 00:05:25 +00:00
parent 613e7d9211
commit 95ef96c00b
2 changed files with 4 additions and 7 deletions
+3 -7
View File
@@ -688,7 +688,9 @@ DoBuy (RESPONSE_REF R)
else if (PLAYER_SAID (R, buy_25_fuel))
needed_credit = 25;
else if (PLAYER_SAID (R, fill_me_up))
needed_credit = (COUNT)~0;
needed_credit = (capacity - GLOBAL_SIS (FuelOnBoard)
+ FUEL_TANK_SCALE - 1)
/ FUEL_TANK_SCALE;
if (needed_credit == 0)
{
@@ -700,12 +702,6 @@ DoBuy (RESPONSE_REF R)
}
else
{
if (needed_credit == (COUNT)~0
&& (needed_credit = (capacity / FUEL_TANK_SCALE)
- (GLOBAL_SIS (FuelOnBoard)
/ FUEL_TANK_SCALE)) == 0)
needed_credit = 1;
if (GLOBAL_SIS (FuelOnBoard) / FUEL_TANK_SCALE
+ needed_credit > capacity / FUEL_TANK_SCALE)
{