mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
the buildtiles method does not in fact build tiles right then and there, but instead queues tiles to update themselves over time. as such, simply disabling then enabling collision no longer functions (and how it did before so before is frankly likely due to exploiting a bug someplace upstream). as such, we set the same flag for NavMeshUpdateAll as we do for NavMeshIgnore to filter something as hidden from navmesh generation or not on a permanent, instead of a temporary basis via removing from the physics sim since it's likely to still be generating by the time it's put back.
This commit is contained in:
parent
775ca57047
commit
f00323c5b9
1 changed files with 2 additions and 8 deletions
|
|
@ -107,8 +107,7 @@ DefineEngineFunction(NavMeshUpdateAll, void, (S32 objid, bool remove), (0, false
|
|||
SceneObject *obj;
|
||||
if(!Sim::findObject(objid, obj))
|
||||
return;
|
||||
if(remove)
|
||||
obj->disableCollision();
|
||||
obj->mPathfindingIgnore = remove;
|
||||
SimSet *set = NavMesh::getServerSet();
|
||||
for(U32 i = 0; i < set->size(); i++)
|
||||
{
|
||||
|
|
@ -119,8 +118,6 @@ DefineEngineFunction(NavMeshUpdateAll, void, (S32 objid, bool remove), (0, false
|
|||
m->buildTiles(obj->getWorldBox());
|
||||
}
|
||||
}
|
||||
if(remove)
|
||||
obj->enableCollision();
|
||||
}
|
||||
|
||||
DefineEngineFunction(NavMeshUpdateAroundObject, void, (S32 objid, bool remove), (0, false),
|
||||
|
|
@ -129,8 +126,7 @@ DefineEngineFunction(NavMeshUpdateAroundObject, void, (S32 objid, bool remove),
|
|||
SceneObject *obj;
|
||||
if (!Sim::findObject(objid, obj))
|
||||
return;
|
||||
if (remove)
|
||||
obj->disableCollision();
|
||||
obj->mPathfindingIgnore = remove;
|
||||
SimSet *set = NavMesh::getServerSet();
|
||||
for (U32 i = 0; i < set->size(); i++)
|
||||
{
|
||||
|
|
@ -141,8 +137,6 @@ DefineEngineFunction(NavMeshUpdateAroundObject, void, (S32 objid, bool remove),
|
|||
m->buildTiles(obj->getWorldBox());
|
||||
}
|
||||
}
|
||||
if (remove)
|
||||
obj->enableCollision();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue