mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Merge pull request #2335 from Azaezel/navmeshNoNo
rewrite of NavMeshUpdateAll/NavMeshUpdateAroundObject
This commit is contained in:
commit
69b7ffc3af
1 changed files with 2 additions and 8 deletions
|
|
@ -107,8 +107,7 @@ DefineEngineFunction(NavMeshUpdateAll, void, (S32 objid, bool remove), (0, false
|
||||||
SceneObject *obj;
|
SceneObject *obj;
|
||||||
if(!Sim::findObject(objid, obj))
|
if(!Sim::findObject(objid, obj))
|
||||||
return;
|
return;
|
||||||
if(remove)
|
obj->mPathfindingIgnore = remove;
|
||||||
obj->disableCollision();
|
|
||||||
SimSet *set = NavMesh::getServerSet();
|
SimSet *set = NavMesh::getServerSet();
|
||||||
for(U32 i = 0; i < set->size(); i++)
|
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());
|
m->buildTiles(obj->getWorldBox());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(remove)
|
|
||||||
obj->enableCollision();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineFunction(NavMeshUpdateAroundObject, void, (S32 objid, bool remove), (0, false),
|
DefineEngineFunction(NavMeshUpdateAroundObject, void, (S32 objid, bool remove), (0, false),
|
||||||
|
|
@ -129,8 +126,7 @@ DefineEngineFunction(NavMeshUpdateAroundObject, void, (S32 objid, bool remove),
|
||||||
SceneObject *obj;
|
SceneObject *obj;
|
||||||
if (!Sim::findObject(objid, obj))
|
if (!Sim::findObject(objid, obj))
|
||||||
return;
|
return;
|
||||||
if (remove)
|
obj->mPathfindingIgnore = remove;
|
||||||
obj->disableCollision();
|
|
||||||
SimSet *set = NavMesh::getServerSet();
|
SimSet *set = NavMesh::getServerSet();
|
||||||
for (U32 i = 0; i < set->size(); i++)
|
for (U32 i = 0; i < set->size(); i++)
|
||||||
{
|
{
|
||||||
|
|
@ -141,8 +137,6 @@ DefineEngineFunction(NavMeshUpdateAroundObject, void, (S32 objid, bool remove),
|
||||||
m->buildTiles(obj->getWorldBox());
|
m->buildTiles(obj->getWorldBox());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (remove)
|
|
||||||
obj->enableCollision();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue