update to 1.6.0
--HG-- branch : openttd
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: newgrf.cpp 27138 2015-02-06 21:56:50Z frosch $ */
|
||||
/* $Id: newgrf.cpp 27507 2016-02-08 21:05:57Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -1402,7 +1402,7 @@ static ChangeInfoResult RoadVehicleChangeInfo(uint engine, int numinfo, int prop
|
||||
break;
|
||||
|
||||
case 0x12: // SFX
|
||||
rvi->sfx = buf->ReadByte();
|
||||
rvi->sfx = GetNewGRFSoundID(_cur.grffile, buf->ReadByte());
|
||||
break;
|
||||
|
||||
case PROP_ROADVEH_POWER: // Power in units of 10 HP.
|
||||
@@ -1590,7 +1590,7 @@ static ChangeInfoResult ShipVehicleChangeInfo(uint engine, int numinfo, int prop
|
||||
break;
|
||||
|
||||
case 0x10: // SFX
|
||||
svi->sfx = buf->ReadByte();
|
||||
svi->sfx = GetNewGRFSoundID(_cur.grffile, buf->ReadByte());
|
||||
break;
|
||||
|
||||
case 0x11: { // Cargoes available for refitting
|
||||
@@ -1758,7 +1758,7 @@ static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int
|
||||
break;
|
||||
|
||||
case 0x12: // SFX
|
||||
avi->sfx = buf->ReadByte();
|
||||
avi->sfx = GetNewGRFSoundID(_cur.grffile, buf->ReadByte());
|
||||
break;
|
||||
|
||||
case 0x13: { // Cargoes available for refitting
|
||||
@@ -6421,8 +6421,8 @@ static void SafeParamSet(ByteReader *buf)
|
||||
{
|
||||
uint8 target = buf->ReadByte();
|
||||
|
||||
/* Only writing GRF parameters is considered safe */
|
||||
if (target < 0x80) return;
|
||||
/* Writing GRF parameters and some bits of 'misc GRF features' are safe. */
|
||||
if (target < 0x80 || target == 0x9E) return;
|
||||
|
||||
/* GRM could be unsafe, but as here it can only happen after other GRFs
|
||||
* are loaded, it should be okay. If the GRF tried to use the slots it
|
||||
@@ -6838,7 +6838,15 @@ static void ParamSet(ByteReader *buf)
|
||||
/* Remove the local flags from the global flags */
|
||||
ClrBit(res, GMB_TRAIN_WIDTH_32_PIXELS);
|
||||
|
||||
_misc_grf_features = res;
|
||||
/* Only copy safe bits for static grfs */
|
||||
if (HasBit(_cur.grfconfig->flags, GCF_STATIC)) {
|
||||
uint32 safe_bits = 0;
|
||||
SetBit(safe_bits, GMB_SECOND_ROCKY_TILE_SET);
|
||||
|
||||
_misc_grf_features = (_misc_grf_features & ~safe_bits) | (res & safe_bits);
|
||||
} else {
|
||||
_misc_grf_features = res;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9F: // locale-dependent settings
|
||||
|
||||
Reference in New Issue
Block a user