mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
This commit is contained in:
parent
a857ed8240
commit
c179c10048
@ -1703,6 +1703,7 @@ function Regression::Vehicle()
|
||||
print(" BuildVehicle(): " + AIVehicle.BuildVehicle(33417, 153));
|
||||
print(" IsValidVehicle(12): " + AIVehicle.IsValidVehicle(12));
|
||||
print(" CloneVehicle(): " + AIVehicle.CloneVehicle(33417, 12, true));
|
||||
print(" BuildVehicle(): " + AIVehicle.BuildVehicle(-1, 153));
|
||||
|
||||
local bank_after = AICompany.GetBankBalance(AICompany.COMPANY_SELF);
|
||||
|
||||
|
@ -9295,6 +9295,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||
BuildVehicle(): 12
|
||||
IsValidVehicle(12): true
|
||||
CloneVehicle(): 13
|
||||
BuildVehicle(): 1048575
|
||||
--Accounting--
|
||||
GetCosts(): 11894
|
||||
Should be: 11894
|
||||
|
@ -333,6 +333,9 @@ bool ScriptObject::ScriptDoCommandHelper<Tcmd, Tret(*)(DoCommandFlag, Targs...)>
|
||||
tile = std::get<0>(args);
|
||||
}
|
||||
|
||||
/* Do not even think about executing out-of-bounds tile-commands. */
|
||||
if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (GetCommandFlags<Tcmd>() & CMD_ALL_TILES) == 0))) return false;
|
||||
|
||||
/* Only set ClientID parameters when the command does not come from the network. */
|
||||
if constexpr ((::GetCommandFlags<Tcmd>() & CMD_CLIENT_ID) != 0) ScriptObjectInternal::SetClientIds(args, std::index_sequence_for<Targs...>{});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user