mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Add version to the recast log prefix
This commit is contained in:
parent
d13f108779
commit
87a2f776b7
3 changed files with 8 additions and 7 deletions
|
@ -523,7 +523,7 @@ namespace DetourNavigator
|
||||||
std::unique_ptr<PreparedNavMeshData> prepareNavMeshTileData(const RecastMesh& recastMesh, ESM::RefId worldspace,
|
std::unique_ptr<PreparedNavMeshData> prepareNavMeshTileData(const RecastMesh& recastMesh, ESM::RefId worldspace,
|
||||||
const TilePosition& tilePosition, const AgentBounds& agentBounds, const RecastSettings& settings)
|
const TilePosition& tilePosition, const AgentBounds& agentBounds, const RecastSettings& settings)
|
||||||
{
|
{
|
||||||
RecastContext context(worldspace, tilePosition, agentBounds, settings.mMaxLogLevel);
|
RecastContext context(worldspace, tilePosition, agentBounds, recastMesh.getVersion(), settings.mMaxLogLevel);
|
||||||
|
|
||||||
const auto [minZ, maxZ] = getBoundsByZ(recastMesh, agentBounds.mHalfExtents.z(), settings);
|
const auto [minZ, maxZ] = getBoundsByZ(recastMesh, agentBounds.mHalfExtents.z(), settings);
|
||||||
|
|
||||||
|
|
|
@ -23,20 +23,20 @@ namespace DetourNavigator
|
||||||
return Debug::Debug;
|
return Debug::Debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string formatPrefix(
|
std::string formatPrefix(ESM::RefId worldspace, const TilePosition& tilePosition,
|
||||||
ESM::RefId worldspace, const TilePosition& tilePosition, const AgentBounds& agentBounds)
|
const AgentBounds& agentBounds, const Version& version)
|
||||||
{
|
{
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
stream << "Worldspace: " << worldspace << "; tile position: " << tilePosition.x() << ", "
|
stream << "Worldspace: " << worldspace << "; tile position: " << tilePosition.x() << ", "
|
||||||
<< tilePosition.y() << "; agent bounds: " << agentBounds << "; ";
|
<< tilePosition.y() << "; agent bounds: " << agentBounds << "; version: " << version << "; ";
|
||||||
return stream.str();
|
return stream.str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RecastContext::RecastContext(ESM::RefId worldspace, const TilePosition& tilePosition,
|
RecastContext::RecastContext(ESM::RefId worldspace, const TilePosition& tilePosition,
|
||||||
const AgentBounds& agentBounds, Debug::Level maxLogLevel)
|
const AgentBounds& agentBounds, const Version& version, Debug::Level maxLogLevel)
|
||||||
: mMaxLogLevel(maxLogLevel)
|
: mMaxLogLevel(maxLogLevel)
|
||||||
, mPrefix(formatPrefix(worldspace, tilePosition, agentBounds))
|
, mPrefix(formatPrefix(worldspace, tilePosition, agentBounds, version))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,13 @@
|
||||||
namespace DetourNavigator
|
namespace DetourNavigator
|
||||||
{
|
{
|
||||||
struct AgentBounds;
|
struct AgentBounds;
|
||||||
|
struct Version;
|
||||||
|
|
||||||
class RecastContext final : public rcContext
|
class RecastContext final : public rcContext
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit RecastContext(ESM::RefId worldspace, const TilePosition& tilePosition, const AgentBounds& agentBounds,
|
explicit RecastContext(ESM::RefId worldspace, const TilePosition& tilePosition, const AgentBounds& agentBounds,
|
||||||
Debug::Level maxLogLevel);
|
const Version& version, Debug::Level maxLogLevel);
|
||||||
|
|
||||||
const std::string& getPrefix() const { return mPrefix; }
|
const std::string& getPrefix() const { return mPrefix; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue