Merge branch 'master' into jgrpp-beta
# Conflicts: # .github/workflows/commit-checker.yml # src/company_cmd.cpp # src/console_cmds.cpp # src/crashlog.cpp # src/lang/english.txt # src/lang/german.txt # src/lang/indonesian.txt # src/lang/japanese.txt # src/lang/korean.txt # src/lang/swedish.txt # src/linkgraph/linkgraphjob.cpp # src/linkgraph/mcf.cpp # src/network/core/tcp.cpp # src/network/core/tcp.h # src/network/core/tcp_game.h # src/network/core/udp.h # src/network/network.cpp # src/network/network_admin.cpp # src/network/network_admin.h # src/network/network_chat_gui.cpp # src/network/network_client.cpp # src/network/network_client.h # src/network/network_func.h # src/network/network_internal.h # src/network/network_server.cpp # src/network/network_server.h # src/newgrf.cpp # src/newgrf_station.cpp # src/order_gui.cpp # src/rail_cmd.cpp # src/saveload/saveload.cpp # src/settings.cpp # src/settings_gui.cpp # src/settings_internal.h # src/settings_type.h # src/station_cmd.cpp # src/stdafx.h # src/table/currency_settings.ini # src/table/misc_settings.ini # src/table/settings.h.preamble # src/table/settings.ini # src/terraform_cmd.cpp # src/timetable_gui.cpp # src/train_cmd.cpp # src/tree_cmd.cpp # src/water_cmd.cpp
This commit is contained in:
@@ -550,17 +550,17 @@ uint32 StationResolverObject::GetDebugID() const
|
||||
/**
|
||||
* Resolver for stations.
|
||||
* @param statspec Station (type) specification.
|
||||
* @param st Instance of the station.
|
||||
* @param base_station Instance of the station.
|
||||
* @param tile %Tile of the station.
|
||||
* @param rt %RailType of the station (unbuilt stations only).
|
||||
* @param callback Callback ID.
|
||||
* @param callback_param1 First parameter (var 10) of the callback.
|
||||
* @param callback_param2 Second parameter (var 18) of the callback.
|
||||
*/
|
||||
StationResolverObject::StationResolverObject(const StationSpec *statspec, BaseStation *st, TileIndex tile, RailType rt,
|
||||
StationResolverObject::StationResolverObject(const StationSpec *statspec, BaseStation *base_station, TileIndex tile, RailType rt,
|
||||
CallbackID callback, uint32 callback_param1, uint32 callback_param2)
|
||||
: ResolverObject(statspec->grf_prop.grffile, callback, callback_param1, callback_param2),
|
||||
station_scope(*this, statspec, st, tile, rt), town_scope(nullptr)
|
||||
station_scope(*this, statspec, base_station, tile, rt), town_scope(nullptr)
|
||||
{
|
||||
/* Invalidate all cached vars */
|
||||
_svc.valid = 0;
|
||||
@@ -931,7 +931,7 @@ uint8 GetStationTileAnimationSpeed(TileIndex tile)
|
||||
return StationAnimationBase::GetAnimationSpeed(ss);
|
||||
}
|
||||
|
||||
void TriggerStationAnimation(BaseStation *st, TileIndex tile, StationAnimationTrigger trigger, CargoID cargo_type)
|
||||
void TriggerStationAnimation(BaseStation *st, TileIndex trigger_tile, StationAnimationTrigger trigger, CargoID cargo_type)
|
||||
{
|
||||
/* List of coverage areas for each animation trigger */
|
||||
static const TriggerArea tas[] = {
|
||||
@@ -939,14 +939,14 @@ void TriggerStationAnimation(BaseStation *st, TileIndex tile, StationAnimationTr
|
||||
};
|
||||
|
||||
/* Get Station if it wasn't supplied */
|
||||
if (st == nullptr) st = BaseStation::GetByTile(tile);
|
||||
if (st == nullptr) st = BaseStation::GetByTile(trigger_tile);
|
||||
|
||||
/* Check the cached animation trigger bitmask to see if we need
|
||||
* to bother with any further processing. */
|
||||
if (!HasBit(st->cached_anim_triggers, trigger)) return;
|
||||
|
||||
uint16 random_bits = Random();
|
||||
ETileArea area = ETileArea(st, tile, tas[trigger]);
|
||||
ETileArea area = ETileArea(st, trigger_tile, tas[trigger]);
|
||||
|
||||
/* Check all tiles over the station to check if the specindex is still in use */
|
||||
for (TileIndex tile : area) {
|
||||
@@ -968,11 +968,11 @@ void TriggerStationAnimation(BaseStation *st, TileIndex tile, StationAnimationTr
|
||||
/**
|
||||
* Trigger station randomisation
|
||||
* @param st station being triggered
|
||||
* @param tile specific tile of platform to trigger
|
||||
* @param trigger_tile specific tile of platform to trigger
|
||||
* @param trigger trigger type
|
||||
* @param cargo_type cargo type causing trigger
|
||||
*/
|
||||
void TriggerStationRandomisation(Station *st, TileIndex tile, StationRandomTrigger trigger, CargoID cargo_type)
|
||||
void TriggerStationRandomisation(Station *st, TileIndex trigger_tile, StationRandomTrigger trigger, CargoID cargo_type)
|
||||
{
|
||||
/* List of coverage areas for each animation trigger */
|
||||
static const TriggerArea tas[] = {
|
||||
@@ -980,7 +980,7 @@ void TriggerStationRandomisation(Station *st, TileIndex tile, StationRandomTrigg
|
||||
};
|
||||
|
||||
/* Get Station if it wasn't supplied */
|
||||
if (st == nullptr) st = Station::GetByTile(tile);
|
||||
if (st == nullptr) st = Station::GetByTile(trigger_tile);
|
||||
|
||||
/* Check the cached cargo trigger bitmask to see if we need
|
||||
* to bother with any further processing. */
|
||||
@@ -988,7 +988,7 @@ void TriggerStationRandomisation(Station *st, TileIndex tile, StationRandomTrigg
|
||||
if (cargo_type != CT_INVALID && !HasBit(st->cached_cargo_triggers, cargo_type)) return;
|
||||
|
||||
uint32 whole_reseed = 0;
|
||||
ETileArea area = ETileArea(st, tile, tas[trigger]);
|
||||
ETileArea area = ETileArea(st, trigger_tile, tas[trigger]);
|
||||
|
||||
CargoTypes empty_mask = 0;
|
||||
if (trigger == SRT_CARGO_TAKEN) {
|
||||
|
Reference in New Issue
Block a user