mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 12:58:00 +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,
|
||||
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);
|
||||
|
||||
|
|
|
@ -23,20 +23,20 @@ namespace DetourNavigator
|
|||
return Debug::Debug;
|
||||
}
|
||||
|
||||
std::string formatPrefix(
|
||||
ESM::RefId worldspace, const TilePosition& tilePosition, const AgentBounds& agentBounds)
|
||||
std::string formatPrefix(ESM::RefId worldspace, const TilePosition& tilePosition,
|
||||
const AgentBounds& agentBounds, const Version& version)
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << "Worldspace: " << worldspace << "; tile position: " << tilePosition.x() << ", "
|
||||
<< tilePosition.y() << "; agent bounds: " << agentBounds << "; ";
|
||||
<< tilePosition.y() << "; agent bounds: " << agentBounds << "; version: " << version << "; ";
|
||||
return stream.str();
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
, mPrefix(formatPrefix(worldspace, tilePosition, agentBounds))
|
||||
, mPrefix(formatPrefix(worldspace, tilePosition, agentBounds, version))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -13,12 +13,13 @@
|
|||
namespace DetourNavigator
|
||||
{
|
||||
struct AgentBounds;
|
||||
struct Version;
|
||||
|
||||
class RecastContext final : public rcContext
|
||||
{
|
||||
public:
|
||||
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; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue