Changeset - r12630:4c1bfe846727
[Not reviewed]
master
0 2 0
smatz - 15 years ago 2009-08-06 17:35:20
smatz@openttd.org
(svn r17091) -Fix (r17089)(r17090): regression test was right
2 files changed with 16 insertions and 15 deletions:
0 comments (0 inline, 0 general)
bin/ai/regression/regression.txt
Show inline comments
 
@@ -8362,13 +8362,13 @@
 
  BuildVehicle():       18
 
  BuildVehicle():       19
 
  MoveWagonChain():     true
 
  GetNumWagons():       3
 
  GetLength():          24
 
  GetWagonEngineType(): 9
 
  GetWagonAge():        0
 
  GetWagonAge():        1
 
  GetWagonEngineType(): 27
 
  GetWagonAge():        0
 
  GetWagonEngineType(): 27
 
  GetWagonAge():        0
 
  GetWagonEngineType(): 65535
 
  GetWagonAge():        -1
 
@@ -8398,29 +8398,29 @@
 
    13 => 2
 
    17 => 1
 
    16 => 1
 
    14 => 1
 
    12 => 1
 
  Age ListDump:
 
    17 => 0
 
    16 => 0
 
    14 => 0
 
    13 => 0
 
    12 => 0
 
    17 => 1
 
    16 => 1
 
    14 => 1
 
    13 => 1
 
    12 => 1
 
  MaxAge ListDump:
 
    16 => 10980
 
    14 => 10980
 
    17 => 7320
 
    13 => 5490
 
    12 => 5490
 
  AgeLeft ListDump:
 
    16 => 10980
 
    14 => 10980
 
    17 => 7320
 
    13 => 5490
 
    12 => 5490
 
    16 => 10979
 
    14 => 10979
 
    17 => 7319
 
    13 => 5489
 
    12 => 5489
 
  CurrentSpeed ListDump:
 
    12 => 21
 
    17 => 0
 
    16 => 0
 
    14 => 0
 
    13 => 0
 
@@ -8432,13 +8432,13 @@
 
    12 => 14
 
  ProfitThisYear ListDump:
 
    17 => 0
 
    16 => 0
 
    14 => 0
 
    13 => 0
 
    12 => 0
 
    12 => -1
 
  ProfitLastYear ListDump:
 
    17 => 0
 
    16 => 0
 
    14 => 0
 
    13 => 0
 
    12 => 0
src/vehicle.cpp
Show inline comments
 
@@ -573,15 +573,16 @@ static void RunVehicleDayProc()
 
		Vehicle *v = Vehicle::Get(i);
 
		if (v == NULL) continue;
 

	
 
		/* Call the 32-day callback if needed */
 
		if ((v->day_counter & 0x1F) == 0) {
 
			uint16 callback = GetVehicleCallback(CBID_VEHICLE_32DAY_CALLBACK, 0, 0, v->engine_type, v);
 
			if (callback == CALLBACK_FAILED) return;
 
			if (HasBit(callback, 0)) TriggerVehicle(v, VEHICLE_TRIGGER_CALLBACK_32); // Trigger vehicle trigger 10
 
			if (HasBit(callback, 1)) v->colourmap = PAL_NONE;
 
			if (callback != CALLBACK_FAILED) {
 
				if (HasBit(callback, 0)) TriggerVehicle(v, VEHICLE_TRIGGER_CALLBACK_32); // Trigger vehicle trigger 10
 
				if (HasBit(callback, 1)) v->colourmap = PAL_NONE;
 
			}
 
		}
 

	
 
		/* This is called once per day for each vehicle, but not in the first tick of the day */
 
		v->OnNewDay();
 
	}
 
}
0 comments (0 inline, 0 general)