Merge pull request #1653 from Azaezel/navtoolMinorFixes
Some checks are pending
Linux Build / ${{matrix.config.name}} (map[build_type:Release cc:gcc cxx:g++ generator:Ninja name:Ubuntu Latest GCC]) (push) Waiting to run
MacOSX Build / ${{matrix.config.name}} (map[build_type:Release cc:clang cxx:clang++ generator:Ninja name:MacOSX Latest Clang]) (push) Waiting to run
Windows Build / ${{matrix.config.name}} (map[build_type:Release cc:cl cxx:cl environment_script:C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat generator:Visual Studio 17 2022 name:Windows Latest MSVC]) (push) Waiting to run

navmesh minor tooling fixes
This commit is contained in:
Brian Roberts 2026-01-16 08:02:43 -06:00 committed by GitHub
commit c811140d3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 5 deletions

View file

@ -312,6 +312,7 @@ IMPLEMENT_CALLBACK( Item, onLeaveLiquid, void, ( const char* objID, const char*
Item::Item()
{
mTypeMask |= ItemObjectType | DynamicShapeObjectType;
mPathfindingIgnore = true;
mDataBlock = 0;
mStatic = false;
mRotate = false;

View file

@ -1552,7 +1552,7 @@ ConsoleDocClass( Player,
Player::Player()
{
mTypeMask |= PlayerObjectType | DynamicShapeObjectType;
mPathfindingIgnore = true;
mDelta.pos = mAnchorPoint = Point3F(0,0,100);
mDelta.rot = mDelta.head = Point3F(0,0,0);
mDelta.rotOffset.set(0.0f,0.0f,0.0f);

View file

@ -376,7 +376,7 @@ Vehicle::Vehicle()
{
mDataBlock = 0;
mTypeMask |= VehicleObjectType | DynamicShapeObjectType;
mPathfindingIgnore = true;
mDelta.pos = Point3F(0,0,0);
mDelta.posVec = Point3F(0,0,0);
mDelta.warpTicks = mDelta.warpCount = 0;

View file

@ -454,8 +454,8 @@ S32 NavMesh::getLink(const Point3F &pos)
{
if(mDeleteLinks[i])
continue;
SphereF start(getLinkStart(i), mLinkRads[i]);
SphereF end(getLinkEnd(i), mLinkRads[i]);
SphereF start(getLinkStart(i), mMax(mLinkRads[i],0.25f));
SphereF end(getLinkEnd(i), mMax(mLinkRads[i], 0.25f));
if(start.isContained(pos) || end.isContained(pos))
return i;
}
@ -653,7 +653,7 @@ DefineEngineMethod(NavMesh, deleteLinks, void, (),,
static void buildCallback(SceneObject* object, void* key)
{
SceneContainer::CallbackInfo* info = reinterpret_cast<SceneContainer::CallbackInfo*>(key);
if (!object->mPathfindingIgnore)
if (!object->mPathfindingIgnore && (object->getTypeMask() & MarkerObjectType) == 0)
object->buildPolyList(info->context, info->polyList, info->boundingBox, info->boundingSphere);
}