Merge branch 'master' into jgrpp
# Conflicts: # src/ai/ai_core.cpp # src/ai/ai_gui.cpp # src/ai/ai_instance.cpp # src/console_cmds.cpp # src/engine_type.h # src/game/game_gui.cpp # src/game/game_instance.cpp # src/goal.cpp # src/goal_cmd.h # src/lang/english.txt # src/lang/estonian.txt # src/network/network_client.cpp # src/newgrf.cpp # src/newgrf_generic.h # src/openttd.cpp # src/saveload/saveload.h # src/script/api/script_log.cpp # src/script/api/script_town.cpp # src/settings_table.cpp # src/station_cmd.cpp # src/station_cmd.h # src/station_map.h # src/strings.cpp # src/table/settings/difficulty_settings.ini # src/table/settings/gui_settings.ini # src/tbtr_template_gui_main.h # src/timetable_cmd.cpp # src/timetable_cmd.h # src/timetable_gui.cpp # src/town_gui.cpp # src/train_gui.cpp # src/water_cmd.cpp
This commit is contained in:
@@ -290,7 +290,7 @@
|
||||
EnforcePrecondition(false, size == TOWN_SIZE_SMALL || size == TOWN_SIZE_MEDIUM || size == TOWN_SIZE_LARGE)
|
||||
EnforcePrecondition(false, size != TOWN_SIZE_LARGE || ScriptObject::GetCompany() == OWNER_DEITY);
|
||||
if (ScriptObject::GetCompany() == OWNER_DEITY || _settings_game.economy.found_town == TF_CUSTOM_LAYOUT) {
|
||||
EnforcePrecondition(false, layout == ROAD_LAYOUT_ORIGINAL || layout == ROAD_LAYOUT_BETTER_ROADS || layout == ROAD_LAYOUT_2x2 || layout == ROAD_LAYOUT_3x3);
|
||||
EnforcePrecondition(false, layout >= ROAD_LAYOUT_ORIGINAL && layout <= ROAD_LAYOUT_RANDOM);
|
||||
} else {
|
||||
/* The layout parameter is ignored for AIs when custom layouts is disabled. */
|
||||
layout = (RoadLayout) (byte)_settings_game.economy.town_layout;
|
||||
@@ -361,10 +361,7 @@
|
||||
int16 new_rating = Clamp(t->ratings[company] + delta, RATING_MINIMUM, RATING_MAXIMUM);
|
||||
if (new_rating == t->ratings[company]) return false;
|
||||
|
||||
uint16 p2 = 0;
|
||||
memcpy(&p2, &new_rating, sizeof(p2));
|
||||
|
||||
return ScriptObject::DoCommand(0, town_id | (company_id << 16), p2, CMD_TOWN_RATING);
|
||||
return ScriptObject::DoCommand(0, town_id | (company_id << 16), new_rating, CMD_TOWN_RATING);
|
||||
}
|
||||
|
||||
/* static */ int ScriptTown::GetAllowedNoise(TownID town_id)
|
||||
|
Reference in New Issue
Block a user