mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r18989) -Codechange: [NewGRF] Initialise rail type map with default rail types.
This commit is contained in:
parent
210a086113
commit
9590c1bb85
@ -5802,6 +5802,13 @@ static void InitNewGRFFile(const GRFConfig *config, int sprite_offset)
|
||||
newfile->price_base_multipliers[i] = INVALID_PRICE_MODIFIER;
|
||||
}
|
||||
|
||||
/* Initialise rail type map with default rail types */
|
||||
memset(newfile->railtype_map, INVALID_RAILTYPE, sizeof newfile->railtype_map);
|
||||
newfile->railtype_map[0] = RAILTYPE_RAIL;
|
||||
newfile->railtype_map[1] = RAILTYPE_ELECTRIC;
|
||||
newfile->railtype_map[2] = RAILTYPE_MONO;
|
||||
newfile->railtype_map[3] = RAILTYPE_MAGLEV;
|
||||
|
||||
/* Copy the initial parameter list
|
||||
* 'Uninitialised' parameters are zeroed as that is their default value when dynamically creating them. */
|
||||
assert_compile(lengthof(newfile->param) == lengthof(config->param) && lengthof(config->param) == 0x80);
|
||||
|
Loading…
Reference in New Issue
Block a user