Jump to content

MMaps Redux


Guest auntieMangos

Recommended Posts

Here we go, http://pastie.org/1576286

Test patch to solve those threading issues. Do not forget to remove that code from post #916.

Thanks in advance for testing and reporting results.

PS: Is it just me, or TerrainInfo never unloaded on runtime? Tiles unloaded just fine, but not the TerrainInfo itself.

I haven't seen Map::~Map() called on runtime either, while I do have Instance.UnloadDelay set to just few minutes.

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

https://gist.github.com/833897

Here are the basic cmake files to include detour in mangos core. Builds detour lib and links it while building src/game. Maybe someone could check them, it compiles and seems to work, but I'm a first time cmake user as well.

Tested on my Arch x86_64 workstation w/ cmake version 2.8.4, gcc (GCC) 4.5.2 20110127 (prerelease), mysql Ver 14.14 Distrib 5.5.9 and ace 6.0 and my Ironforge guard was using mmaps :)

Regards

Skirnir

Link to comment
Share on other sites

Thx for update =)

But what is this:

../dep/src/zlib/CMakeLists.txt

include_directories(
 ${CMAKE_CURRENT_SOURCE_DIR}
)

<<<<<<< HEAD:dep/Makefile.am
# pathfinding
SUBDIRS += recastnavigation

## Additional files to include when running 'make dist'
#  Nothing yet.
=======
add_library(zlib STATIC
 ${zlib_SRCS}
)
>>>>>>> 6800ccd52332276ab167dfa693f4e18953946257:dep/src/zlib/CMakeLists.txt

Link to comment
Share on other sites

Unable to compile on clean install with rsa's ScriptDev2.

Git repo :

git://github.com/faramir118/mangos.git

Commit ID

a886b0cba2a413df1653

Cmake :

cmake version 2.8.4

uname -a

Linux trinity 2.6.26-2-amd64 #1 SMP Tue Jan 25 05:59:43 UTC 2011 x86_64 GNU/Linux

Error :

[ 49%] Building CXX object src/game/CMakeFiles/game.dir/Spell.cpp.o
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp: In member function 'bool VMAP::WmoLiquid::GetLiquidHeight(const G3D::Vector3&, float&) const':
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp:153: warning: comparison of unsigned expression < 0 is always false
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp:156: warning: comparison of unsigned expression < 0 is always false
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp: At global scope:
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp:347: warning: unused parameter 'pStopAtFirstHit'
In file included from /home/mangos/src/mangos/src/game/Spell.cpp:23:
/home/mangos/src/mangos/src/game/GridNotifiers.h:48: warning: unused parameter 'm'
/home/mangos/src/mangos/src/game/GridNotifiers.h: In constructor 'MaNGOS::NearestGameObjectEntryInPosRangeCheck::NearestGameObjectEntryInPosRangeCheck(const WorldObject&, uint32, float, float, float, float)':
/home/mangos/src/mangos/src/game/GridNotifiers.h:716: warning: 'MaNGOS::NearestGameObjectEntryInPosRangeCheck::i_z' will be initialized after
/home/mangos/src/mangos/src/game/GridNotifiers.h:715: warning:   'uint32 MaNGOS::NearestGameObjectEntryInPosRangeCheck::i_entry'
/home/mangos/src/mangos/src/game/GridNotifiers.h:694: warning:   when initialized here
/home/mangos/src/mangos/src/game/GridNotifiers.h: In constructor 'MaNGOS::GameObjectEntryInPosRangeCheck::GameObjectEntryInPosRangeCheck(const WorldObject&, uint32, float, float, float, float)':
/home/mangos/src/mangos/src/game/GridNotifiers.h:745: warning: 'MaNGOS::GameObjectEntryInPosRangeCheck::i_z' will be initialized after
/home/mangos/src/mangos/src/game/GridNotifiers.h:744: warning:   'uint32 MaNGOS::GameObjectEntryInPosRangeCheck::i_entry'
/home/mangos/src/mangos/src/game/GridNotifiers.h:727: warning:   when initialized here
/home/mangos/src/mangos/src/game/GridNotifiers.h: In member function 'bool MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck::operator()(Creature*)':
/home/mangos/src/mangos/src/game/GridNotifiers.h:1121: warning: suggest parentheses around && within ||
In file included from /home/mangos/src/mangos/src/game/GridNotifiersImpl.h:28,
                from /home/mangos/src/mangos/src/game/Spell.cpp:24:
/home/mangos/src/mangos/src/game/SpellAuras.h: At global scope:
/home/mangos/src/mangos/src/game/SpellAuras.h:436: warning: type qualifiers ignored on function return type
/home/mangos/src/mangos/src/game/Spell.cpp: In member function 'void Spell::DoAllEffectOnTarget(Spell::TargetInfo*)':
/home/mangos/src/mangos/src/game/Spell.cpp:1052: warning: enumeral and non-enumeral type in conditional expression
/home/mangos/src/mangos/src/game/Spell.cpp:1087: warning: enumeral and non-enumeral type in conditional expression
/home/mangos/src/mangos/src/game/Spell.cpp:1131: warning: enumeral and non-enumeral type in conditional expression
/home/mangos/src/mangos/src/game/Spell.cpp: In member function 'bool Spell::IsTriggeredSpellWithRedundentData() const':
/home/mangos/src/mangos/src/game/Spell.cpp:6631: warning: suggest parentheses around && within ||
Linking CXX static library libgame.a
[ 49%] Built target game
make: *** [all] Erreur 2

Link to comment
Share on other sites

[ 49%] Building CXX object src/game/CMakeFiles/game.dir/Spell.cpp.o
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp: In member function 'bool VMAP::WmoLiquid::GetLiquidHeight(const G3D::Vector3&, float&) const':
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp:153: warning: comparison of unsigned expression < 0 is always false
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp:156: warning: comparison of unsigned expression < 0 is always false
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp: At global scope:
/home/mangos/src/mangos/src/game/vmap/WorldModel.cpp:347: warning: unused parameter 'pStopAtFirstHit'
In file included from /home/mangos/src/mangos/src/game/Spell.cpp:23:
/home/mangos/src/mangos/src/game/GridNotifiers.h:48: warning: unused parameter 'm'
/home/mangos/src/mangos/src/game/GridNotifiers.h: In constructor 'MaNGOS::NearestGameObjectEntryInPosRangeCheck::NearestGameObjectEntryInPosRangeCheck(const WorldObject&, uint32, float, float, float, float)':
/home/mangos/src/mangos/src/game/GridNotifiers.h:716: warning: 'MaNGOS::NearestGameObjectEntryInPosRangeCheck::i_z' will be initialized after
/home/mangos/src/mangos/src/game/GridNotifiers.h:715: warning:   'uint32 MaNGOS::NearestGameObjectEntryInPosRangeCheck::i_entry'
/home/mangos/src/mangos/src/game/GridNotifiers.h:694: warning:   when initialized here
/home/mangos/src/mangos/src/game/GridNotifiers.h: In constructor 'MaNGOS::GameObjectEntryInPosRangeCheck::GameObjectEntryInPosRangeCheck(const WorldObject&, uint32, float, float, float, float)':
/home/mangos/src/mangos/src/game/GridNotifiers.h:745: warning: 'MaNGOS::GameObjectEntryInPosRangeCheck::i_z' will be initialized after
/home/mangos/src/mangos/src/game/GridNotifiers.h:744: warning:   'uint32 MaNGOS::GameObjectEntryInPosRangeCheck::i_entry'
/home/mangos/src/mangos/src/game/GridNotifiers.h:727: warning:   when initialized here
/home/mangos/src/mangos/src/game/GridNotifiers.h: In member function 'bool MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck::operator()(Creature*)':
/home/mangos/src/mangos/src/game/GridNotifiers.h:1121: warning: suggest parentheses around && within ||
In file included from /home/mangos/src/mangos/src/game/GridNotifiersImpl.h:28,
                from /home/mangos/src/mangos/src/game/Spell.cpp:24:
/home/mangos/src/mangos/src/game/SpellAuras.h: At global scope:
/home/mangos/src/mangos/src/game/SpellAuras.h:436: warning: type qualifiers ignored on function return type
/home/mangos/src/mangos/src/game/Spell.cpp: In member function 'void Spell::DoAllEffectOnTarget(Spell::TargetInfo*)':
/home/mangos/src/mangos/src/game/Spell.cpp:1052: warning: enumeral and non-enumeral type in conditional expression
/home/mangos/src/mangos/src/game/Spell.cpp:1087: warning: enumeral and non-enumeral type in conditional expression
/home/mangos/src/mangos/src/game/Spell.cpp:1131: warning: enumeral and non-enumeral type in conditional expression
/home/mangos/src/mangos/src/game/Spell.cpp: In member function 'bool Spell::IsTriggeredSpellWithRedundentData() const':
/home/mangos/src/mangos/src/game/Spell.cpp:6631: warning: suggest parentheses around && within ||
Linking CXX static library libgame.a
[ 49%] Built target game
make: *** [all] Erreur 2

There are no errors in there, only warnings. Check your log again.

Link to comment
Share on other sites

Hi, I use mmaps in playerbot patch and I have two little questions :

1- Does exist a way to detect boat, zepplin and other transports ?

I rewrite some mangos part to use mmaps in movement follow generator (player template), it works !

This is very usefull for bots !

However in any case, bots can take a boat, they don't "see" it !

2- Does exist a way to fall down from unaccessible plateform if path doesn't exist ?

for example for the dalaran server arena, the beginning area is a pipe, you must fall to begin arena, bots can't fall !

Thank you in advance for read me and answer me.

Link to comment
Share on other sites

I have a question, where I can put a, for example, IsWorldBoss() check to disable mmaps for bosses? With mmaps, several bosses went bugged (is not mmaps problem, I know, but I need time to fix they one by one and workarround like this could do the trick temporaly). In SendMonsterMoveByPath() may be?

Link to comment
Share on other sites

Below something that's hopefully solve (atleast some, if not all) issues with offmesh connections.

http://pastie.org/1590468

Please do test.

About all those compile issues : sorry, but I can't see a single one, related to our code.

Patches are always welcome.

If you have issues on your platform compiling our CLEAN repository, please do let us know. Including platform description and solution.

About my previous patch, the one with threading issues.

I'm going to assume it is sparkling ... so, I'm going to commit it.

1- Does exist a way to detect boat, zepplin and other transports ?

Transports aren't supported at all in mmaps. At best, you can disable pathfinding to players where Player::GetTransport() != NULL

Since mangos do not support NPC on transports by default, we have no way doing it either, so, with or without mmaps you wont have it working. What I'm saying here, is that disabling mmaps on transports wont solve your problem.

I think its been discussed few times already.

Link to comment
Share on other sites

@salja

Can use use the mmap debug commands to test your server first?

  • .mmap stats, .mmap loadedtiles
    Lists stats about the navmesh for your current map/instance
  • .mmap path
    Tests the navmesh by generating a path to your current target (turn on gm mode to see the path)
  • .mmap testarea [radius]
    Like .mmap path, but test multiple mobs around you (for load testing)
  • .mmap loc
    Sort of like .gps

They may help you solve your problem, or will at least give us more information.

Link to comment
Share on other sites

This sort of thing happens when you have .mmap file for given map, but you stand where there's no tile loaded, maybe no .mmtile for that map?

I think I see the problem. Extractor errors on those maps. I think there its from my cleanup back in the day :)

Oh, well - good that this issue was found. I'll push something shortly.

Thanks for reporting.

You will have to extract aforementioned maps ( on any maps with .mmap files but no .mmtile files ).

Cheers.

Link to comment
Share on other sites

Testet on Nexus

mmaps stats:

global mmap pathfinding is enabled

4 maps loaded with 8 tiles overall

Navmesh stats on current map:

0 tiles loaded

0 BVTree nodes

0 polygons (0vertices)

0 triangles (0vertices)

0,00 MB of data (not including pointer)

mmap path:

Azure Wardes path to cynda

Buiding SmoothPaht

lengeth 2 typs 8

start (388.830 9.414, -16.637)

next (309.488, 87.574, -17083)

end (309.488, 87.574, -17083)

actual end (309.488, 87.574, -17083)

Found 1 Creatures

Generated 1paths in 0 ms

mmap tileloc

5763121.mmtile

gridloc [31,31]

Catc [-30,-30]

DT ]??,??] (invalid poly, probably no tile loaded)

I hop this help

Link to comment
Share on other sites

In file included from /home/skirnir/source/mangos/src/game/ChargeMovementGenerator.cpp:2:
/home/skirnir/source/mangos/src/game/ChargeMovementGenerator.h: In member function 'MovementGeneratorType ChargeMovementGeneratorMedium<T, U>::GetMovementGeneratorType() const':
/home/skirnir/source/mangos/src/game/ChargeMovementGenerator.h:25: error: 'CHARGE_MOTION_TYPE' was not declared in this scope
compilation terminated due to -Wfatal-errors.
make[2]: *** [src/game/CMakeFiles/game.dir/ChargeMovementGenerator.cpp.o] Error 1
make[1]: *** [src/game/CMakeFiles/game.dir/all] Error 2
make: *** [all] Error 2

ChargeMovementGenerator does not build on Debian 6.0 and I couldn't fix it :( Otherwise it still works like a charm +1 for "under review"!

Regards

Skirnir

Link to comment
Share on other sites

Rename ChargeMovementGenerator.h/ChargeMovementGenerator.cpp to something like ChargeMovementGenerator.*.excluded or whatever extension you want (not .cpp/.h) (or remove them) and it compiles fine, the ChargeMovementGenerator is not implemented yet, that files are only a "preview".

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