mirror of https://github.com/OpenTTD/OpenTTD
(svn r24231) [1.2] -Backport from trunk:
- Fix: Immediately do the cargo payment on vehicle crashes instead of when they are cleared [FS#5152] (r24219) - Fix: The confirmation window to abort world generation was hidden during world generation, so actually you could not abort it [FS#5159] (r24214) - Fix: If a company is taken over or bankrupts, transfer exclusive transport rights to the new owner respectively cancel them (r24204)release/1.2
parent
7f8b41d956
commit
012871f24c
|
@ -360,7 +360,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
|
||||||
}
|
}
|
||||||
if (new_owner == INVALID_OWNER) RebuildSubsidisedSourceAndDestinationCache();
|
if (new_owner == INVALID_OWNER) RebuildSubsidisedSourceAndDestinationCache();
|
||||||
|
|
||||||
/* Take care of rating in towns */
|
/* Take care of rating and transport rights in towns */
|
||||||
FOR_ALL_TOWNS(t) {
|
FOR_ALL_TOWNS(t) {
|
||||||
/* If a company takes over, give the ratings to that company. */
|
/* If a company takes over, give the ratings to that company. */
|
||||||
if (new_owner != INVALID_OWNER) {
|
if (new_owner != INVALID_OWNER) {
|
||||||
|
@ -378,6 +378,16 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
|
||||||
/* Reset the ratings for the old owner */
|
/* Reset the ratings for the old owner */
|
||||||
t->ratings[old_owner] = RATING_INITIAL;
|
t->ratings[old_owner] = RATING_INITIAL;
|
||||||
ClrBit(t->have_ratings, old_owner);
|
ClrBit(t->have_ratings, old_owner);
|
||||||
|
|
||||||
|
/* Transfer exclusive rights */
|
||||||
|
if (t->exclusive_counter > 0 && t->exclusivity == old_owner) {
|
||||||
|
if (new_owner != INVALID_OWNER) {
|
||||||
|
t->exclusivity = new_owner;
|
||||||
|
} else {
|
||||||
|
t->exclusive_counter = 0;
|
||||||
|
t->exclusivity = INVALID_COMPANY;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -194,6 +194,9 @@ uint Vehicle::Crash(bool flooded)
|
||||||
SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
|
SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
|
||||||
SetWindowDirty(WC_VEHICLE_DEPOT, this->tile);
|
SetWindowDirty(WC_VEHICLE_DEPOT, this->tile);
|
||||||
|
|
||||||
|
delete this->cargo_payment;
|
||||||
|
this->cargo_payment = NULL;
|
||||||
|
|
||||||
return pass;
|
return pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -557,7 +557,7 @@ static bool MayBeShown(const Window *w)
|
||||||
switch (w->window_class) {
|
switch (w->window_class) {
|
||||||
case WC_MAIN_WINDOW: ///< The background, i.e. the game.
|
case WC_MAIN_WINDOW: ///< The background, i.e. the game.
|
||||||
case WC_MODAL_PROGRESS: ///< The actual progress window.
|
case WC_MODAL_PROGRESS: ///< The actual progress window.
|
||||||
case WC_QUERY_STRING: ///< The abort window.
|
case WC_CONFIRM_POPUP_QUERY: ///< The abort window.
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue