Use shared_ptr for TileCachedRecastMeshManager and related objects to make sure unfinished work items have valid object when WorldspaceData is destructed due to a cancellation. Make sure workQueue is destructed before final log message is printed to avoid having log messages from unfinished work items. Do not override NavMeshTileConsumer status on repetitive cancel.
23 lines
486 B
C++
23 lines
486 B
C++
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHPROVIDER_H
|
|
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESHPROVIDER_H
|
|
|
|
#include "tileposition.hpp"
|
|
|
|
#include <components/esm/refid.hpp>
|
|
|
|
#include <memory>
|
|
|
|
namespace DetourNavigator
|
|
{
|
|
class RecastMesh;
|
|
|
|
struct RecastMeshProvider
|
|
{
|
|
virtual ~RecastMeshProvider() = default;
|
|
|
|
virtual std::shared_ptr<RecastMesh> getMesh(ESM::RefId worldspace, const TilePosition& tilePosition) const = 0;
|
|
};
|
|
}
|
|
|
|
#endif
|