mirror of https://github.com/OpenTTD/OpenTTD
(svn r20870) [1.0] -Backport from trunk:
- Fix: Building 2x2 houses did not work for 2x2 road layouts on all map sizes (r20791) - Fix: [NewGRF] Remove a check which is wrong for NewGRF houses and serves no use for original houses [FS#4118] (r20790) - Fix: Spelling mistake in slovak real town names (r20787) - Fix: Do autosave-on-exit as well when using kill/CTRL-C to terminate a dedicated OpenTTD (r20783) - Fix: [NoAI] AIEventCompanyAskMerger was disguised as AIEventCompanyMerger (r20765)release/1.0
parent
672406654c
commit
c9ca7bf778
|
@ -370,7 +370,7 @@ public:
|
|||
* @param value The value/costs of buying the company.
|
||||
*/
|
||||
AIEventCompanyAskMerger(Owner owner, int32 value) :
|
||||
AIEvent(AI_ET_COMPANY_MERGER),
|
||||
AIEvent(AI_ET_COMPANY_ASK_MERGER),
|
||||
owner((AICompany::CompanyID)owner),
|
||||
value(value)
|
||||
{}
|
||||
|
|
|
@ -2115,7 +2115,7 @@ static const char * const _name_slovak_real[] = {
|
|||
"Turcianske Teplice",
|
||||
"Tvrdosin",
|
||||
"Vrable",
|
||||
"Vranov nad Toplov",
|
||||
"Vranov nad Toplou",
|
||||
"Zahorska Bystrica",
|
||||
"Zdiar",
|
||||
"Ziar nad Hronom",
|
||||
|
|
|
@ -402,9 +402,6 @@ static void MakeSingleHouseBigger(TileIndex tile)
|
|||
{
|
||||
assert(IsTileType(tile, MP_HOUSE));
|
||||
|
||||
/* means it is completed, get out. */
|
||||
if (LiftHasDestination(tile)) return;
|
||||
|
||||
/* progress in construction stages */
|
||||
IncHouseConstructionTick(tile);
|
||||
if (GetHouseConstructionTick(tile) != 0) return;
|
||||
|
@ -1987,18 +1984,19 @@ static inline bool TownLayoutAllows2x2HouseHere(Town *t, TileIndex tile)
|
|||
/* Allow towns everywhere when we don't build roads */
|
||||
if (!_settings_game.economy.allow_town_roads && !_generating_world) return true;
|
||||
|
||||
/* MapSize() is sure dividable by both MapSizeX() and MapSizeY(),
|
||||
* so to do only one memory access, use MapSize() */
|
||||
uint dx = MapSize() + TileX(t->xy) - TileX(tile);
|
||||
uint dy = MapSize() + TileY(t->xy) - TileY(tile);
|
||||
/* Compute relative position of tile. (Positive offsets are towards north) */
|
||||
TileIndexDiffC grid_pos = TileIndexToTileIndexDiffC(t->xy, tile);
|
||||
|
||||
switch (t->layout) {
|
||||
case TL_2X2_GRID:
|
||||
if ((dx % 3) != 0 || (dy % 3) != 0) return false;
|
||||
grid_pos.x %= 3;
|
||||
grid_pos.y %= 3;
|
||||
if ((grid_pos.x != 2 && grid_pos.x != -1) ||
|
||||
(grid_pos.y != 2 && grid_pos.y != -1)) return false;
|
||||
break;
|
||||
|
||||
case TL_3X3_GRID:
|
||||
if ((dx % 4) < 2 || (dy % 4) < 2) return false;
|
||||
if ((grid_pos.x & 3) < 2 || (grid_pos.y & 3) < 2) return false;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include "../blitter/factory.hpp"
|
||||
#include "../company_func.h"
|
||||
#include "../core/random_func.hpp"
|
||||
#include "../saveload/saveload.h"
|
||||
#include "../settings_type.h"
|
||||
#include "dedicated_v.h"
|
||||
|
||||
#ifdef BEOS_NET_SERVER
|
||||
|
@ -70,6 +72,7 @@ static void OS2_SwitchToConsoleMode()
|
|||
/* Signal handlers */
|
||||
static void DedicatedSignalHandler(int sig)
|
||||
{
|
||||
if (_game_mode == GM_NORMAL && _settings_client.gui.autosave_on_exit) DoExitSave();
|
||||
_exit_game = true;
|
||||
signal(sig, DedicatedSignalHandler);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue