Merge branch 'development' into cmake/warn_virtual
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -689,9 +689,6 @@ namespace AZ::IO
|
||||
return AZ::IO::InvalidHandle;
|
||||
}
|
||||
|
||||
AZ_PROFILE_SCOPE(Game, "File: %.*s Archive: %p",
|
||||
aznumeric_cast<int>(pName.size()), pName.data(), this);
|
||||
|
||||
SAutoCollectFileAccessTime accessTime(this);
|
||||
|
||||
AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle;
|
||||
@@ -1915,7 +1912,7 @@ namespace AZ::IO
|
||||
return m_pFileEntry->nFileDataOffset;
|
||||
}
|
||||
|
||||
bool Archive::MakeDir(AZStd::string_view szPathIn, [[maybe_unused]] bool bGamePathMapping)
|
||||
bool Archive::MakeDir(AZStd::string_view szPathIn)
|
||||
{
|
||||
AZ::IO::StackString pathStr{ szPathIn };
|
||||
// Determine if there is a period ('.') after the last slash to determine if the path contains a file.
|
||||
@@ -2330,7 +2327,9 @@ namespace AZ::IO
|
||||
// we only want to record ASSET access
|
||||
// assets are identified as things which start with no alias, or with the @assets@ alias
|
||||
auto assetPath = AZ::IO::FileIOBase::GetInstance()->ConvertToAlias(szFilename);
|
||||
if (assetPath && assetPath->Native().starts_with("@assets@"))
|
||||
if (assetPath && (assetPath->Native().starts_with("@assets@")
|
||||
|| assetPath->Native().starts_with("@root@")
|
||||
|| assetPath->Native().starts_with("@projectplatformcache@")))
|
||||
{
|
||||
IResourceList* pList = GetResourceList(m_eRecordFileOpenList);
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace AZ::IO
|
||||
IArchive::SignedFileSize GetFileSizeOnDisk(AZStd::string_view filename) override;
|
||||
|
||||
// creates a directory
|
||||
bool MakeDir(AZStd::string_view szPath, bool bGamePathMapping = false) override;
|
||||
bool MakeDir(AZStd::string_view szPath) override;
|
||||
|
||||
// compresses the raw data into raw data. The buffer for compressed data itself with the heap passed. Uses method 8 (deflate)
|
||||
// returns one of the Z_* errors (Z_OK upon success)
|
||||
|
||||
@@ -335,7 +335,7 @@ namespace AZ::IO
|
||||
virtual IArchive::SignedFileSize GetFileSizeOnDisk(AZStd::string_view filename) = 0;
|
||||
|
||||
// creates a directory
|
||||
virtual bool MakeDir(AZStd::string_view szPath, bool bGamePathMapping = false) = 0;
|
||||
virtual bool MakeDir(AZStd::string_view szPath) = 0;
|
||||
|
||||
// open the physical archive file - creates if it doesn't exist
|
||||
// returns NULL if it's invalid or can't open the file
|
||||
|
||||
@@ -287,11 +287,8 @@ namespace AZ
|
||||
const char* assetAliasPath = GetAlias("@assets@");
|
||||
if (path && assetAliasPath)
|
||||
{
|
||||
AZStd::string assetsAlias(assetAliasPath);
|
||||
AZStd::string pathString = path;
|
||||
AZStd::to_lower(assetsAlias.begin(), assetsAlias.end());
|
||||
AZStd::to_lower(pathString.begin(), pathString.end());
|
||||
if (AZ::IO::PathView(pathString.c_str()).IsRelativeTo(assetsAlias.c_str()))
|
||||
const AZ::IO::PathView pathView(path);
|
||||
if (pathView.IsRelativeTo(assetAliasPath))
|
||||
{
|
||||
AZ_Error("FileIO", false, "You may not alter data inside the asset cache. Please check the call stack and consider writing into the source asset folder instead.\n"
|
||||
"Attempted write location: %s", path);
|
||||
@@ -587,26 +584,11 @@ namespace AZ
|
||||
// strings that are shorter than the alias's mapped path without checking.
|
||||
if ((longestMatch == 0) || (resolvedAlias.size() > longestMatch) && (resolvedAlias.size() <= bufStringLength))
|
||||
{
|
||||
// custom strcmp that ignores slash directions
|
||||
constexpr AZStd::string_view pathSeparators{ "/\\" };
|
||||
bool allMatch = AZStd::equal(resolvedAlias.begin(), resolvedAlias.end(), inBuffer.begin(),
|
||||
[&pathSeparators](const char lhs, const char rhs)
|
||||
// Check if the input path is relative to the alias value
|
||||
if (AZ::IO::PathView(inBuffer).IsRelativeTo(AZ::IO::PathView(resolvedAlias)))
|
||||
{
|
||||
const bool lhsIsSeparator = pathSeparators.find_first_of(lhs) != AZStd::string_view::npos;
|
||||
const bool rhsIsSeparator = pathSeparators.find_first_of(lhs) != AZStd::string_view::npos;
|
||||
return (lhsIsSeparator && rhsIsSeparator) || tolower(lhs) == tolower(rhs);
|
||||
});
|
||||
|
||||
if (allMatch)
|
||||
{
|
||||
// Either the resolvedAlias path must match the path exactly or the path must have a path separator character
|
||||
// right after the resolved alias
|
||||
if (const size_t matchLen = resolvedAlias.size();
|
||||
matchLen == bufStringLength || (pathSeparators.find_first_of(inBuffer[matchLen]) != AZStd::string_view::npos))
|
||||
{
|
||||
longestMatch = matchLen;
|
||||
longestAlias = alias;
|
||||
}
|
||||
longestMatch = resolvedAlias.size();
|
||||
longestAlias = alias;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -712,6 +694,7 @@ namespace AZ
|
||||
const char* assetAliasPath = GetAlias("@assets@");
|
||||
const char* rootAliasPath = GetAlias("@root@");
|
||||
const char* projectPlatformCacheAliasPath = GetAlias("@projectplatformcache@");
|
||||
|
||||
const bool lowercasePath = (assetAliasPath != nullptr && AZ::StringFunc::StartsWith(resolvedPath, assetAliasPath)) ||
|
||||
(rootAliasPath != nullptr && AZ::StringFunc::StartsWith(resolvedPath, rootAliasPath)) ||
|
||||
(projectPlatformCacheAliasPath != nullptr && AZ::StringFunc::StartsWith(resolvedPath, projectPlatformCacheAliasPath));
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "TerrainDataRequestBus.h"
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
|
||||
-8
@@ -45,8 +45,6 @@ namespace AzFramework
|
||||
|
||||
void EntityVisibilityBoundsUnionSystem::OnEntityActivated(AZ::Entity* entity)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AzFramework);
|
||||
|
||||
// ignore any entity that might activate which does not have a TransformComponent
|
||||
if (entity->GetTransform() == nullptr)
|
||||
{
|
||||
@@ -68,8 +66,6 @@ namespace AzFramework
|
||||
|
||||
void EntityVisibilityBoundsUnionSystem::OnEntityDeactivated(AZ::Entity* entity)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AzFramework);
|
||||
|
||||
// ignore any entity that might deactivate which does not have a TransformComponent
|
||||
if (entity->GetTransform() == nullptr)
|
||||
{
|
||||
@@ -89,8 +85,6 @@ namespace AzFramework
|
||||
|
||||
void EntityVisibilityBoundsUnionSystem::UpdateVisibilitySystem(AZ::Entity* entity, EntityVisibilityBoundsUnionInstance& instance)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AzFramework);
|
||||
|
||||
if (const auto& localEntityBoundsUnions = instance.m_localEntityBoundsUnion; localEntityBoundsUnions.IsValid())
|
||||
{
|
||||
// note: worldEntityBounds will not be a 'tight-fit' Aabb but that of a transformed local aabb
|
||||
@@ -155,8 +149,6 @@ namespace AzFramework
|
||||
|
||||
void EntityVisibilityBoundsUnionSystem::OnTransformUpdated(AZ::Entity* entity)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AzFramework);
|
||||
|
||||
// update the world transform of the visibility bounds union
|
||||
if (auto instance_it = m_entityVisibilityBoundsUnionInstanceMapping.find(entity);
|
||||
instance_it != m_entityVisibilityBoundsUnionInstanceMapping.end())
|
||||
|
||||
Reference in New Issue
Block a user