|
|
|
@ -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...>{});
|
|
|
|
|
|
|
|
|
|