mirror of https://github.com/OpenTTD/OpenTTD
(svn r20428) [1.0] -Backport form trunk:
- Fix: Strip non-printable characters before showing it in an edit box, so when renaming a vehicle type you won't get the 'SETX stuff' that some NewGRFs use [FS#3974] (r20220) - Fix: NewGRFs that defined a vehicle without either loaded or loading groups could crash OpenTTD [FS#3964] (r20199) - Fix: [NewGRF] Crash when GetNearbyTileInformation is used to get the terrain type of a MP_VOID tile [FS#3963] (r20197) - Fix: Inconsistencies w.r.t. to km/h vs km-ish/h as 'base' unit for aircraft speeds [FS#3870] (r20164)release/1.0
parent
fc3c216e66
commit
266bb52e1e
|
@ -4998,7 +4998,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||||
CanRefitCargo(): false
|
CanRefitCargo(): false
|
||||||
GetCapacity(): 25
|
GetCapacity(): 25
|
||||||
GetReliability(): 58
|
GetReliability(): 58
|
||||||
GetMaxSpeed(): 238
|
GetMaxSpeed(): 236
|
||||||
GetPrice(): 28710
|
GetPrice(): 28710
|
||||||
GetMaxAge(): 7320
|
GetMaxAge(): 7320
|
||||||
GetRunningCost(): 2390
|
GetRunningCost(): 2390
|
||||||
|
@ -5016,7 +5016,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||||
CanRefitCargo(): false
|
CanRefitCargo(): false
|
||||||
GetCapacity(): 65
|
GetCapacity(): 65
|
||||||
GetReliability(): 95
|
GetReliability(): 95
|
||||||
GetMaxSpeed(): 238
|
GetMaxSpeed(): 236
|
||||||
GetPrice(): 30761
|
GetPrice(): 30761
|
||||||
GetMaxAge(): 8784
|
GetMaxAge(): 8784
|
||||||
GetRunningCost(): 2812
|
GetRunningCost(): 2812
|
||||||
|
@ -5070,7 +5070,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||||
CanRefitCargo(): false
|
CanRefitCargo(): false
|
||||||
GetCapacity(): 30
|
GetCapacity(): 30
|
||||||
GetReliability(): 77
|
GetReliability(): 77
|
||||||
GetMaxSpeed(): 238
|
GetMaxSpeed(): 236
|
||||||
GetPrice(): 30761
|
GetPrice(): 30761
|
||||||
GetMaxAge(): 10980
|
GetMaxAge(): 10980
|
||||||
GetRunningCost(): 2756
|
GetRunningCost(): 2756
|
||||||
|
|
|
@ -67,6 +67,38 @@ No suitable AI can be found
|
||||||
"AI Settings" -> "Select AI" -> "Check Online Content" which is also
|
"AI Settings" -> "Select AI" -> "Check Online Content" which is also
|
||||||
accessed via the main menu.
|
accessed via the main menu.
|
||||||
|
|
||||||
|
After a while of playing, colours get corrupted
|
||||||
|
In Windows 7 the background slideshow corrupts the colour mapping of
|
||||||
|
OpenTTD's 8bpp screen modes. Workarounds for this are:
|
||||||
|
a) Switching to windowed mode, instead of fullscreen
|
||||||
|
b) Switching off background slideshow
|
||||||
|
c) Setting up the 32bpp-anim or 32bpp-optimized blitter
|
||||||
|
|
||||||
|
Long delay between switching songs/music
|
||||||
|
On Windows there is a delay of a (few) second(s) between switching of
|
||||||
|
songs for the "win32" driver. This delay is caused by the fact that
|
||||||
|
opening a MIDI file via MCI is extremely slow.
|
||||||
|
|
||||||
|
DirectMusic, known as "dmusic" in OpenTTD, has a much shorter delay.
|
||||||
|
However, under some circumstances DirectMusic does not reset its
|
||||||
|
state properly causing wrongly pitched/bad sounding songs. This
|
||||||
|
problem is in DirectMusic as it is reproducable with Microsoft's
|
||||||
|
DirectMusic Producer. DirectMusic has been deprecated since 2004
|
||||||
|
and as such has no support for 64 bits OpenTTD.
|
||||||
|
|
||||||
|
As a delay is favourable over bad sounding music the "win32" driver
|
||||||
|
is the default driver for OpenTTD. You can change this default by
|
||||||
|
setting the "musicdriver" in your openttd.cfg to "dmusic".
|
||||||
|
|
||||||
|
Custom vehicle type name is incorrectly aligned
|
||||||
|
Some NewGRFs use sprites that are bigger than normal in the "buy
|
||||||
|
vehicle" window. Due to this they have to encode an offset for the
|
||||||
|
vehicle type name. Upon renaming the vehicle type this encoded offset
|
||||||
|
is stripped from the name because the "edit box" cannot show this
|
||||||
|
encoding. As a result the custom vehicle type names will get the
|
||||||
|
default alignment. The only way to (partly) fix this is by adding
|
||||||
|
spaces to the custom name.
|
||||||
|
|
||||||
Clipping problems [FS#119]
|
Clipping problems [FS#119]
|
||||||
In some cases sprites are not drawn as one would expect. Examples of
|
In some cases sprites are not drawn as one would expect. Examples of
|
||||||
this are aircraft that might be hidden below the runway or trees that
|
this are aircraft that might be hidden below the runway or trees that
|
||||||
|
@ -178,3 +210,9 @@ OpenTTD not properly resizing with SDL on X [FS#3305]
|
||||||
Window managers that are known to exhibit this behaviour are KDE's
|
Window managers that are known to exhibit this behaviour are KDE's
|
||||||
and GNOME's. With the XFCE's and LXDE's window managers the resize
|
and GNOME's. With the XFCE's and LXDE's window managers the resize
|
||||||
event is sent when the user releases the mouse.
|
event is sent when the user releases the mouse.
|
||||||
|
|
||||||
|
Crashes when playing music [FS#3941]
|
||||||
|
Mac OS X's QuickTime (default music driver) and Windows' MCI (win32
|
||||||
|
music driver) crash on some songs from OpenMSX. OpenTTD cannot do
|
||||||
|
anything about this. Please report these crashes to the authors of
|
||||||
|
OpenMSX so the crash causing songs can be removed or fixed.
|
||||||
|
|
|
@ -251,7 +251,7 @@ openttd (0.6.0-2) unstable; urgency=low
|
||||||
[ Matthijs Kooijman ]
|
[ Matthijs Kooijman ]
|
||||||
* Don't install anything into ~ during make install, this prevented
|
* Don't install anything into ~ during make install, this prevented
|
||||||
successful builds on some architectures. Fix imported from upstream.
|
successful builds on some architectures. Fix imported from upstream.
|
||||||
* Put the homepage in it's own Homepage field instead of in the description.
|
* Put the homepage in its own Homepage field instead of in the description.
|
||||||
* Bump Standards-Version to 3.7.3
|
* Bump Standards-Version to 3.7.3
|
||||||
|
|
||||||
-- Jordi Mallach <jordi@debian.org> Thu, 03 Apr 2008 00:07:10 +0200
|
-- Jordi Mallach <jordi@debian.org> Thu, 03 Apr 2008 00:07:10 +0200
|
||||||
|
|
|
@ -669,8 +669,8 @@ void UpdateAircraftCache(Aircraft *v)
|
||||||
{
|
{
|
||||||
uint max_speed = GetVehicleProperty(v, PROP_AIRCRAFT_SPEED, 0);
|
uint max_speed = GetVehicleProperty(v, PROP_AIRCRAFT_SPEED, 0);
|
||||||
if (max_speed != 0) {
|
if (max_speed != 0) {
|
||||||
/* Convert from original units to (approx) km/h */
|
/* Convert from original units to km-ish/h */
|
||||||
max_speed = (max_speed * 129) / 10;
|
max_speed = (max_speed * 128) / 10;
|
||||||
|
|
||||||
v->acache.cached_max_speed = max_speed;
|
v->acache.cached_max_speed = max_speed;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1237,7 +1237,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
|
||||||
case VEH_TRAIN: t = Train::From(u)->tcache.cached_max_speed; break;
|
case VEH_TRAIN: t = Train::From(u)->tcache.cached_max_speed; break;
|
||||||
case VEH_ROAD: t = u->max_speed / 2; break;
|
case VEH_ROAD: t = u->max_speed / 2; break;
|
||||||
case VEH_SHIP: t = u->max_speed; break;
|
case VEH_SHIP: t = u->max_speed; break;
|
||||||
case VEH_AIRCRAFT: t = u->max_speed * 10 / 129; break; // convert to old units
|
case VEH_AIRCRAFT: t = u->max_speed * 10 / 128; break; // convert to old units
|
||||||
default: NOT_REACHED();
|
default: NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1251,7 +1251,7 @@ struct QueryStringWindow : public QueryStringBaseWindow
|
||||||
QueryStringBaseWindow(maxsize)
|
QueryStringBaseWindow(maxsize)
|
||||||
{
|
{
|
||||||
GetString(this->edit_str_buf, str, &this->edit_str_buf[maxsize - 1]);
|
GetString(this->edit_str_buf, str, &this->edit_str_buf[maxsize - 1]);
|
||||||
this->edit_str_buf[maxsize - 1] = '\0';
|
str_validate(this->edit_str_buf, &this->edit_str_buf[maxsize - 1], false, true);
|
||||||
|
|
||||||
if ((flags & QSF_ACCEPT_UNCHANGED) == 0) this->orig = strdup(this->edit_str_buf);
|
if ((flags & QSF_ACCEPT_UNCHANGED) == 0) this->orig = strdup(this->edit_str_buf);
|
||||||
|
|
||||||
|
|
|
@ -1034,12 +1034,12 @@ static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int
|
||||||
avi->cost_factor = buf->ReadByte();
|
avi->cost_factor = buf->ReadByte();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_AIRCRAFT_SPEED: // 0x0C Speed (1 unit is 8 mph, we translate to 1 unit is 1 km/h)
|
case PROP_AIRCRAFT_SPEED: // 0x0C Speed (1 unit is 8 mph, we translate to 1 unit is 1 km-ish/h)
|
||||||
avi->max_speed = (buf->ReadByte() * 129) / 10;
|
avi->max_speed = (buf->ReadByte() * 128) / 10;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0D: // Acceleration
|
case 0x0D: // Acceleration
|
||||||
avi->acceleration = (buf->ReadByte() * 129) / 10;
|
avi->acceleration = (buf->ReadByte() * 128) / 10;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_AIRCRAFT_RUNNING_COST_FACTOR: // 0x0E Running cost factor
|
case PROP_AIRCRAFT_RUNNING_COST_FACTOR: // 0x0E Running cost factor
|
||||||
|
|
|
@ -322,6 +322,7 @@ uint32 GetTerrainType(TileIndex tile, bool upper_halftile)
|
||||||
has_snow = (GetTileMaxZ(tile) > GetSnowLine());
|
has_snow = (GetTileMaxZ(tile) > GetSnowLine());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MP_VOID:
|
||||||
case MP_WATER:
|
case MP_WATER:
|
||||||
has_snow = (GetTileZ(tile) > GetSnowLine());
|
has_snow = (GetTileZ(tile) > GetSnowLine());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -863,6 +863,8 @@ static const SpriteGroup *VehicleResolveReal(const ResolverObject *object, const
|
||||||
|
|
||||||
uint totalsets = in_motion ? group->num_loaded : group->num_loading;
|
uint totalsets = in_motion ? group->num_loaded : group->num_loading;
|
||||||
|
|
||||||
|
if (totalsets == 0) return NULL;
|
||||||
|
|
||||||
uint set = (v->cargo.Count() * totalsets) / max((uint16)1, v->cargo_cap);
|
uint set = (v->cargo.Count() * totalsets) / max((uint16)1, v->cargo_cap);
|
||||||
set = min(set, totalsets - 1);
|
set = min(set, totalsets - 1);
|
||||||
|
|
||||||
|
|
|
@ -1295,11 +1295,11 @@ bool AfterLoadGame()
|
||||||
|
|
||||||
if (CheckSavegameVersion(50)) {
|
if (CheckSavegameVersion(50)) {
|
||||||
Aircraft *v;
|
Aircraft *v;
|
||||||
/* Aircraft units changed from 8 mph to 1 km/h */
|
/* Aircraft units changed from 8 mph to 1 km-ish/h */
|
||||||
FOR_ALL_AIRCRAFT(v) {
|
FOR_ALL_AIRCRAFT(v) {
|
||||||
if (v->subtype <= AIR_AIRCRAFT) {
|
if (v->subtype <= AIR_AIRCRAFT) {
|
||||||
const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type);
|
const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type);
|
||||||
v->cur_speed *= 129;
|
v->cur_speed *= 128;
|
||||||
v->cur_speed /= 10;
|
v->cur_speed /= 10;
|
||||||
v->max_speed = avi->max_speed;
|
v->max_speed = avi->max_speed;
|
||||||
v->acceleration = avi->acceleration;
|
v->acceleration = avi->acceleration;
|
||||||
|
|
|
@ -113,7 +113,7 @@ void str_validate(char *str, const char *last, bool allow_newlines, bool ignore)
|
||||||
/* Assume the ABSOLUTE WORST to be in str as it comes from the outside. */
|
/* Assume the ABSOLUTE WORST to be in str as it comes from the outside. */
|
||||||
|
|
||||||
char *dst = str;
|
char *dst = str;
|
||||||
while (*str != '\0') {
|
while (str <= last && *str != '\0') {
|
||||||
size_t len = Utf8EncodedCharLen(*str);
|
size_t len = Utf8EncodedCharLen(*str);
|
||||||
/* If the character is unknown, i.e. encoded length is 0
|
/* If the character is unknown, i.e. encoded length is 0
|
||||||
* we assume worst case for the length check.
|
* we assume worst case for the length check.
|
||||||
|
@ -146,6 +146,16 @@ void str_validate(char *str, const char *last, bool allow_newlines, bool ignore)
|
||||||
/* Replace the undesirable character with a question mark */
|
/* Replace the undesirable character with a question mark */
|
||||||
str += len;
|
str += len;
|
||||||
if (!ignore) *dst++ = '?';
|
if (!ignore) *dst++ = '?';
|
||||||
|
|
||||||
|
/* In case of these two special cases assume that they really
|
||||||
|
* mean SETX/SETXY and also "eat" the paramater. If this was
|
||||||
|
* not the case the string was broken to begin with and this
|
||||||
|
* would not break much more. */
|
||||||
|
if (c == SCC_SETX) {
|
||||||
|
str++;
|
||||||
|
} else if (c == SCC_SETXY) {
|
||||||
|
str += 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -558,7 +558,7 @@ static const ShipVehicleInfo _orig_ship_vehicle_info[] = {
|
||||||
* @param h mail_capacity
|
* @param h mail_capacity
|
||||||
* @param i passenger_capacity
|
* @param i passenger_capacity
|
||||||
*/
|
*/
|
||||||
#define AVI(a, b, c, d, e, f, g, h, i) { a, b, c, d, e, f, (g * 129) / 10, h, i }
|
#define AVI(a, b, c, d, e, f, g, h, i) { a, b, c, d, e, f, (g * 128) / 10, h, i }
|
||||||
#define H AIR_HELI
|
#define H AIR_HELI
|
||||||
#define P AIR_CTOL
|
#define P AIR_CTOL
|
||||||
#define J AIR_CTOL | AIR_FAST
|
#define J AIR_CTOL | AIR_FAST
|
||||||
|
|
Loading…
Reference in New Issue