Jump to content

MMaps Redux


Guest auntieMangos

Recommended Posts

Have you tried ccache ?

I think you didn't read what he said. If you change a header, everything that uses the header has to be compiled, even if you use some caching system. Using ccache won't change anything. Instead, solution is to use caching system (which is usually on by default) with small changes in source files (like he said.) ;)

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

What about of pet's following by these paths? As i see at my latest test (10502 rev+latest branch) pets (guardians) still moving to owner through textures or any walls... but they shouldn't

Mobs also can climb on the little house near the Orgrimmar's bank... I'm using "movemapgen --skipContinents false" at mmaps extracting

Link to comment
Share on other sites

Another pack of changes.

* missing parts from my previous patches.

* some cleanup.

* better path representation in debug command.

Some side notes: findPath/findSmoothPath/etc cannot return path longer than the bound value you give them, thus checking m_polyLength >= MAX_PATH_LENGTH wont ever work. I think we already spoke about all others.

Patch against (80ef7cb97e) : http://pastie.org/1166621

Take care.

Link to comment
Share on other sites

What about of pet's following by these paths? As i see at my latest test (10502 rev+latest branch) pets still moving to owner/target through textures or any walls... but they shouldn't

Tested with water elemental, by clicking stay, then moving away and using follow, and it works as expected.

Can you post how it can be reproduced?

Link to comment
Share on other sites

Can you post how it can be reproduced?

tested with .npc follow on stomrwind guard, when trying to enter into the house that near of npc 6174 - the guard is walking through house's wall

as i already seen, summoned pets works as should.

EDIT: maybe this is just a problem with this place, mobs there (near this house's walls) sometimes walks under textures on follow, i think this a reason because they won't follow the path

Link to comment
Share on other sites

tested with .npc follow on stomrwind guard, when trying to enter into the house that near of npc 6174 - the guard is walking through house's wall

as i already seen, summoned pets works as excepted.

I'm pretty sure this is the one of few cases where PointMovementGenerator is used. I don't think we need to implement pathfinding into it.

Maybe I'm wrong.

Edit: I was wrong, it isn't PointMovementGenerator or any of its derivatives (AssistanceMovementGenerator). It must problematic place in maps.

In fact, the only place PointMovementGenerator really used, is in script calls.

Link to comment
Share on other sites

I don't know if there is the EventAI or mmaps bug, but sometimes caster-scripted EventAI mobs get a stuck if you stay behind the wall from them, you can simply reproduce it by trying to aggro big pack of mobs and hide behind the wall in Zulfarrak instance.

I hope you can reproduce this and fix, because this a big exploit and can be used by players

Link to comment
Share on other sites

I don't know if there is the EventAI or mmaps bug, but sometimes caster-scripted EventAI mobs get a stuck if you stay behind the wall from them, you can simply reproduce it by trying to aggro big pack of mobs and hide behind the wall in Zulfarrak instance.

Nothing to do with move maps - you can try w/o them and see that the result is exactly the same.

Just pick almost any caster-scripted mob, those that start to cast spell (with cast time) as soon as aggroed are the best. Attack him with ranged ability, move quickly out of LoS. He wont finish casting the spell and will stuck there until you come into los long enough for him to finish his cast.

On a related note : Looks like you are testing this patch. Any feedback? How about performance issues? tester counts, added load, etc.

I'm sure we all'd love to see some detailed report.

Link to comment
Share on other sites

Miscellaneous places that probably need pathfinding:

  • * Spell::EffectCharge
    * Spell::EffectCharge2
    * PointMovementGenerator
    * FleeingMovementGenerator (replace the 'primitive pathfinding')
    * Creature::IsOutOfThreatArea (not sure if it is retail-like)
    * Unit::isInAccessiblePlaceFor (for detecting impeding terrain)
    * AssistDelayEvent::Execute (to generate one path for a group of creatures at aggro)
Link to comment
Share on other sites

On a related note : Looks like you are testing this patch. Any feedback? How about performance issues? tester counts, added load, etc.

I'm sure we all'd love to see some detailed report.

yes, I'm testing this patch and wanna to make a branch that contains my patches + this patch (as i did with first versions of vmap_rewrite)

At current moment I'm testing it in one person ^^ and seems all works ok.

About perfomance tests. At current monemt i was trying to aggro all mobs in Zulfarrak instance... and what i see, when i try to hide behind the wall from them - at first 1-2 seconds CPU load jumps to 2-3 percent, then it takes again his usually value - 0 percents. Seems these paths is computed once at player moving.

Processor at my test server is Intel Core2Duo E4500 - 2200 GHz, what i can say about ram loads... it's not increased since i installed this patch, at least i can't see the difference.

i disagree, this movement is a straight line and is handled by vmaps

did you ever seen how it works on offy? As i seen from the movies - the warrior on charge will go around any trees or other objects that stay on his path to victim. So seems it should be handled through mmaps, because vmaps only allows you to cast for example through a rock or other mountains, but you know... warrior shouldn't follow to target at simple line through these all.

For example charge can be casted through a mountain with graveyard at WSG battleground, warrior will climb on this mountain instead of running under textures

another example http://filebeam.com/73d5dbc55b33a0bdb87d8485dcafff31.jpg

with loglevel=0 this spam

3087207961's UpdateNextPosition failed: 4046454815 length path
285412893's UpdateNextPosition failed: 4046454806 length path
1308823073's UpdateNextPosition failed: 4046454812 length path
1308823073's UpdateNextPosition failed: 4046454812 length path
285412908's UpdateNextPosition failed: 4046454806 length path
1946357296's UpdateNextPosition failed: 4046454814 length path
1812139566's UpdateNextPosition failed: 4046454814 length path
1812139566's UpdateNextPosition failed: 4046454814 length path
302190123's UpdateNextPosition failed: 4046454806 length path
1812139566's UpdateNextPosition failed: 4046454814 length path
302190122's UpdateNextPosition failed: 4046454806 length path
302190125's UpdateNextPosition failed: 4046454806 length path
302190132's UpdateNextPosition failed: 4046454806 length path
285412915's UpdateNextPosition failed: 4046454806 length path
1946357296's UpdateNextPosition failed: 4046454814 length path
302190123's UpdateNextPosition failed: 4046454806 length path
3087207961's UpdateNextPosition failed: 4046454815 length path
1812139566's UpdateNextPosition failed: 4046454814 length path
285412908's UpdateNextPosition failed: 4046454806 length path
302190122's UpdateNextPosition failed: 4046454806 length path
302190125's UpdateNextPosition failed: 4046454806 length path

is very annoying

Link to comment
Share on other sites

Waht about this errors? I get these erros while extracting the mmaps with some mapids

Building map 109:

We have 4 tiles.

ERROR:StaticMapTree::UnloadMapTile(): Trying to unload non-loaded tile. Map:109

X:31 Y:32

ERROR:StaticMapTree::UnloadMapTile(): Trying to unload non-loaded tile. Map:109

X:31 Y:33

ERROR:StaticMapTree::UnloadMapTile(): Trying to unload non-loaded tile. Map:109

X:32 Y:32

ERROR:StaticMapTree::UnloadMapTile(): Trying to unload non-loaded tile. Map:109

X:32 Y:33

Complete!

Link to comment
Share on other sites

Hi,

I've just tried compiling the latest code and I get the following error.

  CXX    PathFinder.o                                                                                                                                        
../../../src/game/PathFinder.cpp: In constructor ‘PathInfo::PathInfo(const WorldObject*, float, float, float)’:                                              
../../../src/game/PathFinder.cpp:30: error: invalid use of incomplete type ‘struct Map’                                                                      
../../../src/game/Object.h:71: error: forward declaration of ‘struct Map’                                                                                    
../../../src/game/PathFinder.cpp: In member function ‘NavTerrain PathInfo::getNavTerrain(float, float, float)’:                                              
../../../src/game/PathFinder.cpp:502: error: ‘GridMapLiquidData’ was not declared in this scope                                                              
../../../src/game/PathFinder.cpp:502: error: expected ‘;’ before ‘data’                                                                                      
../../../src/game/PathFinder.cpp:503: error: invalid use of incomplete type ‘struct Map’                                                                     
../../../src/game/Object.h:71: error: forward declaration of ‘struct Map’                                                                                    
../../../src/game/PathFinder.cpp:503: error: ‘MAP_ALL_LIQUIDS’ was not declared in this scope                                                                
../../../src/game/PathFinder.cpp:503: error: ‘data’ was not declared in this scope                                                                           
../../../src/game/PathFinder.cpp:507: error: ‘MAP_LIQUID_TYPE_WATER’ was not declared in this scope                                                          
../../../src/game/PathFinder.cpp:508: error: ‘MAP_LIQUID_TYPE_OCEAN’ was not declared in this scope                                                          
../../../src/game/PathFinder.cpp:510: error: ‘MAP_LIQUID_TYPE_MAGMA’ was not declared in this scope                                                          
../../../src/game/PathFinder.cpp:512: error: ‘MAP_LIQUID_TYPE_SLIME’ was not declared in this scope                                                          
make[4]: *** [PathFinder.o] Error 1                                                                                                                          
m

I noticed in this commit http://github.com/faramir118/mangos/commit/314eb2602fae472a59945cb26ab09a5765095881 that you have removed the reference to '#include Map.h'. If this is restored the error does not occur.

Hope this helps

Link to comment
Share on other sites

Been away for a week, but now I'm back, sort of ...

Below attached patch with following changes:

  • * Integrating pathfinding into PointMovementGenerator. Since it is mostly used in scripts (via MovePoint() ), pathfinding there is optional parameter.
    * Proper packet reserve size in Unit::SendMonsterMoveByPath().
    * Optimization in PathInfo::BuildPath() - we don't have to iterate more than once on our current poly-path to get all the info we need.
    * Bad logic in PathInfo::BuildPath() ::: (startPolyFound && !endPolyFound) case. If suffix generation fails we still need to copy the new prefix into our current path. I think the original got overwritten somewhere, causing this issue.
    * Little change in findSmoothPath() define parameters, just values I found to give bit better results. Still need much more testing.

Patched against (321ed6f2b) :: http://pastie.org/1181579

...with loglevel=0 this spam...

Can you please tell me where and how I can reproduce those? If possible on latest.

There's no way those paths can be generated without something going really wrong.

Link to comment
Share on other sites

Can you please tell me where and how I can reproduce those? If possible on latest.

There's no way those paths can be generated without something going really wrong.

This happens when some enemy creatures can't reach you for attack - they running all around and can't find a path to come closer, but if you come closer to their attack range - they will start attack through walls or another textures and climb up to you through walls or any objects, console error happens in this moment. You can find example in this video that i captured http://filekeeper.org/download/insider/different/video%20example%20for%20bug.zip

when creature walk through wall this error appears

3758151289's UpdateNextPosition failed: 4046454796 length path

That is the bug that i tried to show you before.

And another thing - if creature can't reach you then he should go into evade after few seconds, but on mangos with mmaps they doesn't evade, they just waiting a moment to walk through wall or other object.

Video and bug report from http://github.com/faramir118/mangos/commit/321ed6f2baa717a44c2a0ea9654ecf81f6f43e53

Edited:

same bug with you latest patch

Link to comment
Share on other sites

The second error is intentional until we complete the aggro part.

In cases of no complete path to the target, we can easily prevent the monster from moving all the way to the target - just omit the last point on the path.

But then the monster would move to the end of its path, but not reach the target.

This could be exploited by ranged classes, so for now I just made monsters move through walls rather than stand still and die.

The first error is a puzzle. Path length has a hard limit... I don't know how it possibly got over that limit.

Link to comment
Share on other sites

Well I figured out why the monster wanders around on the ledge when you are in a place it can't walk to - the path returned by Detour does not include the destination point - it stops at the nearest reachable location. You can see this easily with [.debug mmap path] when you are standing in a location that the monster can't reach.

Static analysis of findStraightPath tells me that it's always supposed to include the destination at the end of the path...

Am I way off base, or is this not the way I had it working before? I'm confused...

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