(svn r18781) -Codechange: pass the CommandCost to the callback instead of whether it succeeded or not.
-Fix: AIs did update their last cost incorrectly in network games if the cost of the DC_EXEC phase differed from the ~DC_EXEC phase.
This commit is contained in:
@@ -2145,14 +2145,14 @@ void StopGlobalFollowVehicle(const Vehicle *v)
|
||||
|
||||
/**
|
||||
* This is the Callback method after the construction attempt of a primary vehicle
|
||||
* @param success indicates completion (or not) of the operation
|
||||
* @param result indicates completion (or not) of the operation
|
||||
* @param tile unused
|
||||
* @param p1 unused
|
||||
* @param p2 unused
|
||||
*/
|
||||
void CcBuildPrimaryVehicle(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
||||
void CcBuildPrimaryVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
if (!success) return;
|
||||
if (result.Failed()) return;
|
||||
|
||||
const Vehicle *v = Vehicle::Get(_new_vehicle_id);
|
||||
if (v->tile == _backup_orders_tile) {
|
||||
|
Reference in New Issue
Block a user