Jump to content

MMaps Redux


Guest auntieMangos

Recommended Posts

Could this be caused by a similair problem?

http://pastebin.com/n2nyyW8p

t = 0x4280003a <Address 0x4280003a out of bounds>

The crash itself seems very similair. (and also seems to be caused by offmeshes)

Looks about the same.

Is it from code with latest change?

PS: added something little better to address this problem to repository. (but the patch posted here should do exactly the same, just bit less efficiently)

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Yes it is included, but ill do a full re-patch/compile just incase.

Can you please test below code and report?

diff --git a/dep/recastnavigation/Detour/Source/DetourNavMeshQuery.cpp b/dep/recastnavigation/Detour/Source/DetourNavMeshQuery.cpp
index f2c07e0..6a6eb94 100644
--- a/dep/recastnavigation/Detour/Source/DetourNavMeshQuery.cpp
+++ b/dep/recastnavigation/Detour/Source/DetourNavMeshQuery.cpp
@@ -169,6 +169,10 @@ dtStatus dtNavMeshQuery::closestPointOnPoly(dtPolyRef ref, const float* pos, flo
    if (m_nav->getTileAndPolyByRef(ref, &tile, &poly) != DT_SUCCESS)
        return DT_FAILURE;
    if (!tile) return DT_FAILURE;
+
+    if (poly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION)
+        return DT_FAILURE;
+
    if (closestPointOnPolyInTile(tile, poly, pos, closest) != DT_SUCCESS)
        return DT_FAILURE;
    return DT_SUCCESS;

For some reason it looks like closestPointOnPoly() really don't like offmesh connection polygons, while findNearestPoly() has no problem returning those ...

Just hope its really offmesh connection related ...

Link to comment
Share on other sites

Its added, but I cant reproduce the crash so we'll have to wait and see what happens.

I'll edit this post once I know more,

Thanks once again.

Edit: Stable so far(12h uptime)

Edit2: Almost 48hr now, still no related crash.

Edit3: Confirmed stable.

ps im only using mmaps in arena and bg's. only offmesh I use is in Blade Edge Arena.

Link to comment
Share on other sites

Its added, but I cant reproduce the crash so we'll have to wait and see what happens.

I'll edit this post once I know more,

Thanks once again.

Edit: Stable so far(12h uptime)

Thanks for testing.

Added the patch to repository with some related changes.

Anyone else having problems with charge/pet walking through the ropes in Blade's Edge Arena?

You are missing offmesh connections there, search up what it is all about :)

PS: that reminds me: none yet posted any offmesh connections. Don't be shy.

Best regards.

Link to comment
Share on other sites

How does one determine if there is an off-mesh connection causing such trouble? Is a Map ID all that is needed or will it require exact coordinates when reporting finding an off-mesh tile?

I am surprised nobody has contributed any to the Offmesh.txt file, so these issues can be fixed. :/

All you server admins out there! Collect as many off-mesh tile locations as you can and post them here so faramir and qsa can include them in the list for the mmaps generator to fix by "stitching" those tiles together.

Link to comment
Share on other sites

How does one determine if there is an off-mesh connection causing such trouble?

Open the problem map in the mmaps viewer (you will have to have debug tiles built with the extractor) and test the part causing trouble. It should be obvious if there is a break in the tiles that needs to be fixed.

Link to comment
Share on other sites

Is a Map ID all that is needed or will it require exact coordinates when reporting finding an off-mesh tile?

Unfortunately, it is not trivial.

You have to know exact map id, tile id and coordinates of start and end of connection.

Just look at the example in offmesh_example.txt

That particular tile have to be re-extracted afterwards.

As Patman128 said, best way is to look at the mesh itself in debug tool, again, not trivial but its the best way we have.

Link to comment
Share on other sites

Guys, I want to edit/add custom pathings to my .mmap files - more specifically I want to make it possible pets to be able to walk through the ropes in Blade's Edge arena.

Would someone please explain me really short which tools I need and how should I proceed?

I read the posts, and I see that you need a lot of the paths "implented manually by hand" (if I perceived the context correctly).

Once I learn the technique I will share my pathfinding corrections.

Thank you in advance for the help. :)

Link to comment
Share on other sites

  • 1 month later...

u need to create file offmesh.txt and insert

562 31,20 (6234.545898 256.902100 11.075373) (6230.961914 252.127274 11.180979) 8 // Blade's Edge Arena

562 31,20 (6243.081543 266.918854 11.059557) (6246.507324 271.623505 11.230524) 8 // Blade's Edge Arena

into it

then extract mmap for that map again

movements_extractor.exe 562 --tile 31,20 --debugOutput true --offMeshInput offmesh.txt

and i want to ask why that new mesh is not in debug file when i try to open it with recastdemo? :-(

how i must modify extractor to show offmesh?

Link to comment
Share on other sites

  • 1 month later...

qsa, I just want to know if the evade timeout for creatures is finished? Or any news on this point?

Have a nice day!

I was kinda hoping someone else would pitch this part up. I tried it once and it turned to really ugly hack very quickly.

Maybe someone else has better idea.

hi,

I have a bug:

If a creature knockback you in air, the creature goes into enterevademode, because the creature can't reach you. I hope for fast help.

Same as above, missing evade timeout.

Dear qsa, is the evade timeout system finished? You know if the players move to a place where the boss can't reach in combact, the boss will evade immediately and this is a waste of time for raids. There must be some time left for the players to access the boss in position. Meanwhile the boss should looked at(also can cast range spells if the boss can) his target and wait about 26 secs and evade at last if players don't move.

This is the very very important point which impact the entertainment feeling in detail.

I really hope someone can contribute this part to the mmaps system.

Thanks a lot, :)

Tom

Link to comment
Share on other sites

u need to create file offmesh.txt and insert

562 31,20 (6234.545898 256.902100 11.075373) (6230.961914 252.127274 11.180979) 8 // Blade's Edge Arena

562 31,20 (6243.081543 266.918854 11.059557) (6246.507324 271.623505 11.230524) 8 // Blade's Edge Arena

into it

then extract mmap for that map again

movements_extractor.exe 562 --tile 31,20 --debugOutput true --offMeshInput offmesh.txt

Im still having problems with the BeM arena ropes :/ Pets wont go through it. What exactly i have to do? Create a new folder meshes, offmesh.txt with the text you wrote, and just run that command ? (changed to MoveMapGen.exe, but it doesnt matter now). Some new files have been generated, what should i do with them ?

Link to comment
Share on other sites

MoveMapGen.exe 562 --tile 31,20 --debugOutput true --offMeshInput offmesh.txt

mapid (562 is that arena's map id)

tile (31,20 is the tile that has the ropes on it)

debug output for RecastDemo, which can be found under dep/recastnavigation. Use it to view the navmesh. (this command is not mandatory for adding offmesh connections, just useful for debugging)

offmesh file when used, it will rebuild map tiles (from scratch) with offmesh connections. it creates tiles just like a regular build, so they will be placed in the same spot (and overwrite existing files, if present)

Link to comment
Share on other sites

Unfortunatly the idea is not so simple.

We need to generate path and after test if that path is generated.

bool Creature::IsReacheable(Unit* pVictim)
{
   GetMotionMaster()->MoveChase(pVictim);
   if (GetMotionMaster()->operator->()->IsReachable())
       return true;
   return false;
}

I only know movechase to try to generate path. But this cannot be used in Unit::SelectHostileTarget because that call is done every update.

The best is to have fast but accurate fonction who can result with reacheable or not.

Link to comment
Share on other sites

Something like this:

bool Creature::CanReach(Unit* pVictim)
{
   PathFinder path(this);

   float x, y, z;
   pVictim->GetPosition(x, y, z);
   path.calculate(x, y, z, false);

   return path.getPathType() & PATHFIND_NORMAL;
}

Should probably first check a few other conditions (on same map?, in same instance?, is pathfinding enabled?, etc)

Also, since pathfinding is expensive, you may want to attempt to use the existing path from movement generator, if possible

  • check if current movement generator is chase or follow
  • cast it to targeted movement generator, check if its target is pVictim
  • if both previous checks succeed, use GetMotionMaster()->operator->()->IsReachable()
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use