mirror of https://github.com/OpenTTD/OpenTTD
(svn r20091) [1.0] -Backport from trunk:
- Fix: Clear force_proceed when entering depots and when loading, resetting of force_proceed on manual stopping did not work [FS#3878] (r19992) - Fix: Do not show an error message when trying to start/stop a crashed plane [FS#3874] (r19953) - Fix: Allow turning of roadvehicles while waiting in a queue (r19945) - Fix: Disallow moving of vehicle news window [FS#3865] (r19943) - Fix: Under some (unlucky) circumstances the wrong company would be "current company" when changing company colour or orders [FS#3903]release/1.0
parent
017e56d64b
commit
8ed3cde783
|
@ -466,7 +466,7 @@
|
||||||
- Fix: Some inconsistencies with the difficulty settings in the scenario editor. Also re-enable changing some difficulty settings (e.g. max loan) in the scenario editor [FS#3219] (r17644)
|
- Fix: Some inconsistencies with the difficulty settings in the scenario editor. Also re-enable changing some difficulty settings (e.g. max loan) in the scenario editor [FS#3219] (r17644)
|
||||||
- Fix: Do not accept cargo produced in the same industry; generalise and improve the check used only for valuables (r17437)
|
- Fix: Do not accept cargo produced in the same industry; generalise and improve the check used only for valuables (r17437)
|
||||||
- Fix: Pay only for cargo actually delivered, not for all cargo unloaded at station; can differ with 'stockpiling' industries (r17436)
|
- Fix: Pay only for cargo actually delivered, not for all cargo unloaded at station; can differ with 'stockpiling' industries (r17436)
|
||||||
- Fix: Improve movement of aircraft; do not make turns bigger then 45 degrees while in flight, do not move while turning on the ground (r17415, r17405)
|
- Fix: Improve movement of aircraft; do not make turns bigger than 45 degrees while in flight, do not move while turning on the ground (r17415, r17405)
|
||||||
- Fix: Crash in order GUI when changing some orders with both the mouse and keyboard at the exact same time [FS#2859] (r17384)
|
- Fix: Crash in order GUI when changing some orders with both the mouse and keyboard at the exact same time [FS#2859] (r17384)
|
||||||
- Fix: Trains would not show smoke if the load/unload counter was not 0, though there does not seem to be a reason to check that variable anyhow anymore [FS#3162] (r17352)
|
- Fix: Trains would not show smoke if the load/unload counter was not 0, though there does not seem to be a reason to check that variable anyhow anymore [FS#3162] (r17352)
|
||||||
- Fix: One was not offered to take over bankrupt companies anymore; caused by the introduction NoAI, although NewAI had the same problem too [FS#2769] (r17345)
|
- Fix: One was not offered to take over bankrupt companies anymore; caused by the introduction NoAI, although NewAI had the same problem too [FS#2769] (r17345)
|
||||||
|
@ -2619,7 +2619,7 @@
|
||||||
- Fix: [Network] 'kick 1' did crash dedicated servers
|
- Fix: [Network] 'kick 1' did crash dedicated servers
|
||||||
- Fix: [Network] A server no longer crashes when a client sends an invalid DoCommand, but drops the client instead
|
- Fix: [Network] A server no longer crashes when a client sends an invalid DoCommand, but drops the client instead
|
||||||
- Fix: [Network] Added packet protection. No longer a client or server
|
- Fix: [Network] Added packet protection. No longer a client or server
|
||||||
- Fix: [Network] Bug in bind system. Advertising failed on systems with more then 1 ip, and server_bind active to one of them
|
- Fix: [Network] Bug in bind system. Advertising failed on systems with more than 1 ip, and server_bind active to one of them
|
||||||
- Fix: [Network] Disabled 'money-cheat' (read: bug which could give people a lot of money)
|
- Fix: [Network] Disabled 'money-cheat' (read: bug which could give people a lot of money)
|
||||||
- Fix: [SDL] Now the binary never links to SDL if DEDICATED is set
|
- Fix: [SDL] Now the binary never links to SDL if DEDICATED is set
|
||||||
- Fix: [Windows] Somehow mousewheel was disabled on windows using SDL; reenabled again
|
- Fix: [Windows] Somehow mousewheel was disabled on windows using SDL; reenabled again
|
||||||
|
|
|
@ -23,7 +23,7 @@ Multiplayer Manual for OpenTTD (0.3.5)
|
||||||
- If you want to see which servers all online on the Internet, click on 'Internet'
|
- If you want to see which servers all online on the Internet, click on 'Internet'
|
||||||
and 'Find Server'
|
and 'Find Server'
|
||||||
|
|
||||||
- If there were more then one server
|
- If there were more than one server
|
||||||
- select one in the list below the buttons
|
- select one in the list below the buttons
|
||||||
- click on 'join game'
|
- click on 'join game'
|
||||||
|
|
||||||
|
|
|
@ -193,10 +193,10 @@ static const WindowDesc _thin_news_desc(
|
||||||
|
|
||||||
/* Small news items. */
|
/* Small news items. */
|
||||||
static const NWidgetPart _nested_small_news_widgets[] = {
|
static const NWidgetPart _nested_small_news_widgets[] = {
|
||||||
/* Caption + close box */
|
/* Caption + close box. The caption is no WWT_CAPTION as the window shall not be moveable and so on. */
|
||||||
NWidget(NWID_HORIZONTAL),
|
NWidget(NWID_HORIZONTAL),
|
||||||
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, NTW_CLOSEBOX),
|
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, NTW_CLOSEBOX),
|
||||||
NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, NTW_CAPTION), SetDataTip(STR_NEWS_MESSAGE_CAPTION, STR_NULL),
|
NWidget(WWT_EMPTY, COLOUR_LIGHT_BLUE, NTW_CAPTION), SetFill(1, 0),
|
||||||
EndContainer(),
|
EndContainer(),
|
||||||
|
|
||||||
/* Main part */
|
/* Main part */
|
||||||
|
@ -394,9 +394,13 @@ struct NewsWindow : Window {
|
||||||
virtual void DrawWidget(const Rect &r, int widget) const
|
virtual void DrawWidget(const Rect &r, int widget) const
|
||||||
{
|
{
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
|
case NTW_CAPTION:
|
||||||
|
DrawCaption(r, COLOUR_LIGHT_BLUE, this->owner, STR_NEWS_MESSAGE_CAPTION);
|
||||||
|
break;
|
||||||
|
|
||||||
case NTW_PANEL:
|
case NTW_PANEL:
|
||||||
this->DrawNewsBorder(r);
|
this->DrawNewsBorder(r);
|
||||||
return;
|
break;
|
||||||
|
|
||||||
case NTW_MESSAGE:
|
case NTW_MESSAGE:
|
||||||
CopyInDParam(0, this->ni->params, lengthof(this->ni->params));
|
CopyInDParam(0, this->ni->params, lengthof(this->ni->params));
|
||||||
|
|
|
@ -413,7 +413,7 @@ CommandCost CmdTurnRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||||
v->overtaking != 0 ||
|
v->overtaking != 0 ||
|
||||||
v->state == RVSB_WORMHOLE ||
|
v->state == RVSB_WORMHOLE ||
|
||||||
v->IsInDepot() ||
|
v->IsInDepot() ||
|
||||||
v->cur_speed < 5) {
|
v->current_order.IsType(OT_LOADING)) {
|
||||||
return CMD_ERROR;
|
return CMD_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2995,6 +2995,9 @@ static void TrainEnterStation(Train *v, StationID station)
|
||||||
AI::NewEvent(v->owner, new AIEventStationFirstVehicle(st->index, v->index));
|
AI::NewEvent(v->owner, new AIEventStationFirstVehicle(st->index, v->index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v->force_proceed = 0;
|
||||||
|
SetWindowDirty(WC_VEHICLE_VIEW, v->index);
|
||||||
|
|
||||||
v->BeginLoading();
|
v->BeginLoading();
|
||||||
|
|
||||||
StationAnimationTrigger(st, v->tile, STAT_ANIM_TRAIN_ARRIVES);
|
StationAnimationTrigger(st, v->tile, STAT_ANIM_TRAIN_ARRIVES);
|
||||||
|
@ -4001,10 +4004,10 @@ static bool TrainLocoHandler(Train *v, bool mode)
|
||||||
int j = v->UpdateSpeed();
|
int j = v->UpdateSpeed();
|
||||||
|
|
||||||
/* we need to invalidate the widget if we are stopping from 'Stopping 0 km/h' to 'Stopped' */
|
/* we need to invalidate the widget if we are stopping from 'Stopping 0 km/h' to 'Stopped' */
|
||||||
if (v->cur_speed == 0 && v->tcache.last_speed == 0 && (v->vehstatus & VS_STOPPED)) {
|
if (v->cur_speed == 0 && (v->vehstatus & VS_STOPPED)) {
|
||||||
/* If we manually stopped, we're not force-proceeding anymore. */
|
/* If we manually stopped, we're not force-proceeding anymore. */
|
||||||
v->force_proceed = 0;
|
v->force_proceed = 0;
|
||||||
SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
|
SetWindowDirty(WC_VEHICLE_VIEW, v->index);
|
||||||
}
|
}
|
||||||
|
|
||||||
int adv_spd = (v->direction & 1) ? 192 : 256;
|
int adv_spd = (v->direction & 1) ? 192 : 256;
|
||||||
|
|
|
@ -1001,6 +1001,7 @@ void VehicleEnterDepot(Vehicle *v)
|
||||||
|
|
||||||
UpdateSignalsOnSegment(t->tile, INVALID_DIAGDIR, t->owner);
|
UpdateSignalsOnSegment(t->tile, INVALID_DIAGDIR, t->owner);
|
||||||
t->wait_counter = 0;
|
t->wait_counter = 0;
|
||||||
|
t->force_proceed = 0;
|
||||||
ClrBit(t->flags, VRF_TOGGLE_REVERSE);
|
ClrBit(t->flags, VRF_TOGGLE_REVERSE);
|
||||||
t->ConsistChanged(true);
|
t->ConsistChanged(true);
|
||||||
break;
|
break;
|
||||||
|
@ -1022,6 +1023,7 @@ void VehicleEnterDepot(Vehicle *v)
|
||||||
break;
|
break;
|
||||||
default: NOT_REACHED();
|
default: NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
SetWindowDirty(WC_VEHICLE_VIEW, v->index);
|
||||||
|
|
||||||
if (v->type != VEH_TRAIN) {
|
if (v->type != VEH_TRAIN) {
|
||||||
/* Trains update the vehicle list when the first unit enters the depot and calls VehicleEnterDepot() when the last unit enters.
|
/* Trains update the vehicle list when the first unit enters the depot and calls VehicleEnterDepot() when the last unit enters.
|
||||||
|
|
|
@ -89,7 +89,7 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||||
case VEH_AIRCRAFT: {
|
case VEH_AIRCRAFT: {
|
||||||
Aircraft *a = Aircraft::From(v);
|
Aircraft *a = Aircraft::From(v);
|
||||||
/* cannot stop airplane when in flight, or when taking off / landing */
|
/* cannot stop airplane when in flight, or when taking off / landing */
|
||||||
if (a->state >= STARTTAKEOFF && a->state < TERM7) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT);
|
if (!(v->vehstatus & VS_CRASHED) && a->state >= STARTTAKEOFF && a->state < TERM7) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
default: return CMD_ERROR;
|
default: return CMD_ERROR;
|
||||||
|
|
|
@ -513,7 +513,7 @@ static inline void DrawCloseBox(const Rect &r, Colours colour, StringID str)
|
||||||
* @param owner 'Owner' of the window.
|
* @param owner 'Owner' of the window.
|
||||||
* @param str Text to draw in the bar.
|
* @param str Text to draw in the bar.
|
||||||
*/
|
*/
|
||||||
static inline void DrawCaption(const Rect &r, Colours colour, Owner owner, StringID str)
|
void DrawCaption(const Rect &r, Colours colour, Owner owner, StringID str)
|
||||||
{
|
{
|
||||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, colour, FR_BORDERONLY);
|
DrawFrameRect(r.left, r.top, r.right, r.bottom, colour, FR_BORDERONLY);
|
||||||
DrawFrameRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, colour, (owner == INVALID_OWNER) ? FR_LOWERED | FR_DARKENED : FR_LOWERED | FR_DARKENED | FR_BORDERONLY);
|
DrawFrameRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, colour, (owner == INVALID_OWNER) ? FR_LOWERED | FR_DARKENED : FR_LOWERED | FR_DARKENED | FR_BORDERONLY);
|
||||||
|
|
|
@ -2226,6 +2226,17 @@ static void CheckSoftLimit()
|
||||||
*/
|
*/
|
||||||
void InputLoop()
|
void InputLoop()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* During the generation of the world, there might be
|
||||||
|
* another thread that is currently building for example
|
||||||
|
* a road. To not interfere with those tasks, we should
|
||||||
|
* NOT change the _current_company here.
|
||||||
|
*
|
||||||
|
* This is not necessary either, as the only events that
|
||||||
|
* can be handled are the 'close application' events
|
||||||
|
*/
|
||||||
|
if (!IsGeneratingWorld()) _current_company = _local_company;
|
||||||
|
|
||||||
CheckSoftLimit();
|
CheckSoftLimit();
|
||||||
HandleKeyScrolling();
|
HandleKeyScrolling();
|
||||||
|
|
||||||
|
|
|
@ -119,8 +119,9 @@ enum WidgetDrawDistances {
|
||||||
WD_PAR_VSEP_WIDE = 8, ///< Large amount of vertical space between two paragraphs of text.
|
WD_PAR_VSEP_WIDE = 8, ///< Large amount of vertical space between two paragraphs of text.
|
||||||
};
|
};
|
||||||
|
|
||||||
/* wiget.cpp */
|
/* widget.cpp */
|
||||||
void DrawFrameRect(int left, int top, int right, int bottom, Colours colour, FrameFlags flags);
|
void DrawFrameRect(int left, int top, int right, int bottom, Colours colour, FrameFlags flags);
|
||||||
|
void DrawCaption(const Rect &r, Colours colour, Owner owner, StringID str);
|
||||||
|
|
||||||
/* window.cpp */
|
/* window.cpp */
|
||||||
extern Window *_z_front_window;
|
extern Window *_z_front_window;
|
||||||
|
|
Loading…
Reference in New Issue