Jump to content

[10167] vmap rewrite


Auntie Mangos

Recommended Posts

I merged your branch with the lastest mangos rev 9815 and "Release|x64" built & I made new maps and vmaps

It seems to be working fine it has been running for 3 hours - area detection is working great indoor detection works great :)

old vmaps 1.84GB

vmaps are now only 548MB

thank you - Lynx3d, faramir118, arrai, tom_rus and anyone else that might of helped with this :)

edit: I just had the bug where you can't enter a building it only happens until you re-log into wow if you delete your cache folder this bug will come back it has nothing to do with restarting the server.

edit:nvm seems to have to do with both

edit:lol i can't seem to make it happen again now

edit: no now only some i can't enter :confused:

it seems you only get this bug when you log off mounted

+ in WSG when you go over the tunnel you get dismounted when you should not be

i made a hacky fix for both but it would be nice if they could be solved the right way :)

one is it dismounts you when you log off

other one is if your in the area id that the tunnel in wsg is in the indoor detection for pos z goes up by 9.5

lol but it works

Link to comment
Share on other sites

  • Replies 298
  • Created
  • Last Reply

Top Posters In This Topic

+ in WSG when you go over the tunnel you get dismounted when you should not be

Confirmed.

Probably needs an additional terrain height check.

Seems the bound of the tunnel object peeks through the ground there, and there's no wrapping WMO marked as outdoor either (like most buildings that are split into an inner and outer shell).

Link to comment
Share on other sites

Our branches are merged.

Windows users have to build libmpq, extractor, and assembler - do not have access to VC90 right now, so I didn't push binaries.

Let me know if anybody has build errors on windows.

I'll play around with redoing contrib/extractor/ so that it uses the same libmpq as contrib/vmap_extractor/

Link to comment
Share on other sites

it seems you only get this bug when you log off mounted

+ in WSG when you go over the tunnel you get dismounted when you should not be

i made a hacky fix for both but it would be nice if they could be solved the right way :)

one is it dismounts you when you log off

other one is if your in the area id that the tunnel in wsg is in the indoor detection for pos z goes up by 9.5

lol but it works

Confirmed.. Other then WSG second level, this is working awesome. 31 hours uptime with 200+ peaks.

If you could share your WSG fix, i'd be very greatful =)

Link to comment
Share on other sites

As i thought, the tunnel object in WSG is pretty long and goes uphill, so i definitely need to check the "normal" terrain also for deciding if you "touch" a WMO that is defined indoor.

I think i already got it working, but i need to cleanup a bit first, and i'm tired now...fix will come tomorrow.

@djmagma59: and i hate patch files :P

Serously, read some darn GIT tutorial.

It's not like this branch only changes a few lines here and there...

Link to comment
Share on other sites

Fixed crash with PerformIndoorCheck(). Thanks to przemratajczak

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 988d19c..a1537e2 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1384,7 +1384,7 @@ void Player::Update( uint32 p_time )
    UpdateEnchantTime(p_time);
    UpdateHomebindTime(p_time);

-    if(sWorld.getConfig(CONFIG_UINT32_VMAP_INDOOR_INTERVAL) &&
+    if(IsInWorld() && sWorld.getConfig(CONFIG_UINT32_VMAP_INDOOR_INTERVAL) &&
       (m_IndoorCheckTimer+=p_time) >=  sWorld.getConfig(CONFIG_UINT32_VMAP_INDOOR_INTERVAL))
    {
        PerformIndoorCheck();

Link to comment
Share on other sites

Yes please mention your 'head' commit when reporting problems...

Also note that i don't have any confirmation that aforementioned "crash fix" is actually required with clean sources, i only got backtraces from obviously patched cores.

Vladimir can't see a reason either why it should be necessary, teleports that touch "IsInWorld()" are supposed to be delayed until after this line.

Link to comment
Share on other sites

I just pushed the first implementation of WMO Liquids.

Note that it requires additional vmap queries and you cannot disable it currently.

You should now be able to fish in buildings/cities/instances etc. and also correctly get breath timer only when underwater (but note that there definitely seems to be an existing mangos bug, sometimes your mount swims correctly, sometimes your mount is completely submerged and you will drown when not jumping all the time).

Also, be careful where you jump in, lava and slime *will* hurt now ;)

However, the Undercity liquid is also classified slime, but mangos deals the same damage in any slime, so i had to add a hack there.

Need to extract and assemble vmaps again, of course.

Link to comment
Share on other sites

Getting vmap_assembler crash, tries to allocate 22GB for float array :)

>vmap_assembler.exe!operator new[](unsigned int count=2979583320)  Line 6 + 0x9 bytes    C++
>vmap_assembler.exe!VMAP::WmoLiquid::WmoLiquid(unsigned int width=3253294421, unsigned int height=1069240320, const G3D::Vector3 & corner={...}, unsigned int type=21845)  Line 107 + 0x25 bytes    C++
>vmap_assembler.exe!VMAP::TileAssembler::readRawFile2(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & pModelFilename="Abbeygate01.wmo", VMAP::ModelPosition & pModelPosition={...})  Line 464 + 0x68 bytes    C++
>vmap_assembler.exe!VMAP::TileAssembler::convertWorld2()  Line 184 + 0x1b bytes    C++
>vmap_assembler.exe!main(int argc=3, char * * argv=0x00574580)  Line 110 + 0x8 bytes    C++

Maybe writing uninitialized values for WMOLiquidHeader members in extractor?

Link to comment
Share on other sites

10>..\\..\\src\\game\\Unit.cpp(3575) : error C2668: 'Map::IsInWater' : ambiguous call to overloaded function

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(308): could be 'bool Map::IsInWater(float,float,float) const'

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(307): or 'bool Map::IsInWater(float,float,float,LiquidData *) const'

10> while trying to match the argument list '(float, float, float)'

10>FleeingMovementGenerator.cpp

10>..\\..\\src\\game\\FleeingMovementGenerator.cpp(149) : error C2668: 'Map::IsInWater' : ambiguous call to overloaded function

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(308): could be 'bool Map::IsInWater(float,float,float) const'

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(307): or 'bool Map::IsInWater(float,float,float,LiquidData *) const'

10> while trying to match the argument list '(float, float, float)'

10> ..\\..\\src\\game\\FleeingMovementGenerator.cpp(55) : while compiling class template member function 'bool FleeingMovementGenerator<T>::_getPoint(T &,float &,float &,float &)'

10> with

10> [

10> T=Creature

10> ]

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\FleeingMovementGenerator.h(65) : see reference to class template instantiation 'FleeingMovementGenerator<T>' being compiled

10> with

10> [

10> T=Creature

10> ]

10>..\\..\\src\\game\\FleeingMovementGenerator.cpp(151) : error C2668: 'Map::IsInWater' : ambiguous call to overloaded function

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(308): could be 'bool Map::IsInWater(float,float,float) const'

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(307): or 'bool Map::IsInWater(float,float,float,LiquidData *) const'

10> while trying to match the argument list '(float, float, float)'

10>..\\..\\src\\game\\FleeingMovementGenerator.cpp(162) : error C2668: 'Map::IsInWater' : ambiguous call to overloaded function

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(308): could be 'bool Map::IsInWater(float,float,float) const'

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(307): or 'bool Map::IsInWater(float,float,float,LiquidData *) const'

10> while trying to match the argument list '(float, float, float)'

10>..\\..\\src\\game\\FleeingMovementGenerator.cpp(149) : error C2668: 'Map::IsInWater' : ambiguous call to overloaded function

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(308): could be 'bool Map::IsInWater(float,float,float) const'

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(307): or 'bool Map::IsInWater(float,float,float,LiquidData *) const'

10> while trying to match the argument list '(float, float, float)'

10> ..\\..\\src\\game\\FleeingMovementGenerator.cpp(55) : while compiling class template member function 'bool FleeingMovementGenerator<T>::_getPoint(T &,float &,float &,float &)'

10> with

10> [

10> T=Player

10> ]

10> ..\\..\\src\\game\\FleeingMovementGenerator.cpp(321) : see reference to class template instantiation 'FleeingMovementGenerator<T>' being compiled

10> with

10> [

10> T=Player

10> ]

10>..\\..\\src\\game\\FleeingMovementGenerator.cpp(151) : error C2668: 'Map::IsInWater' : ambiguous call to overloaded function

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(308): could be 'bool Map::IsInWater(float,float,float) const'

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(307): or 'bool Map::IsInWater(float,float,float,LiquidData *) const'

10> while trying to match the argument list '(float, float, float)'

10>..\\..\\src\\game\\FleeingMovementGenerator.cpp(162) : error C2668: 'Map::IsInWater' : ambiguous call to overloaded function

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(308): could be 'bool Map::IsInWater(float,float,float) const'

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(307): or 'bool Map::IsInWater(float,float,float,LiquidData *) const'

10> while trying to match the argument list '(float, float, float)'

10>DestinationHolder.cpp

10>ConfusedMovementGenerator.cpp

10>World.cpp

10>..\\..\\src\\game\\ConfusedMovementGenerator.cpp(54) : error C2668: 'Map::IsInWater' : ambiguous call to overloaded function

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(308): could be 'bool Map::IsInWater(float,float,float) const'

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(307): or 'bool Map::IsInWater(float,float,float,LiquidData *) const'

10> while trying to match the argument list '(float, float, float)'

10> ..\\..\\src\\game\\ConfusedMovementGenerator.cpp(28) : while compiling class template member function 'void ConfusedMovementGenerator<T>::Initialize(T &)'

10> with

10> [

10> T=Creature

10> ]

10> ..\\..\\src\\game\\ConfusedMovementGenerator.cpp(72) : see reference to class template instantiation 'ConfusedMovementGenerator<T>' being compiled

10> with

10> [

10> T=Creature

10> ]

10>..\\..\\src\\game\\ConfusedMovementGenerator.cpp(54) : error C2668: 'Map::IsInWater' : ambiguous call to overloaded function

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(308): could be 'bool Map::IsInWater(float,float,float) const'

10> c:\\documents and settings\\vlad\\desktop\\mangos\\mangos\\src\\game\\Map.h(307): or 'bool Map::IsInWater(float,float,float,LiquidData *) const'

10> while trying to match the argument list '(float, float, float)'

10> ..\\..\\src\\game\\ConfusedMovementGenerator.cpp(28) : while compiling class template member function 'void ConfusedMovementGenerator<T>::Initialize(T &)'

10> with

10> [

10> T=Player

10> ]

10> ..\\..\\src\\game\\ConfusedMovementGenerator.cpp(82) : see reference to class template instantiation 'ConfusedMovementGenerator<T>' being compiled

10> with

10> [

10> T=Player

10> ]

Here are a part of those errors executed by my compiler (VC90) , with no mods except the mangos clear repo + faramir's mmaps + vmap_rewrite repo ,also i resolved the conflict in Map.h file by removing the <<< lines ,hope you can solve this soon!

thanks in advance

Link to comment
Share on other sites

Ehm merging with mmaps will hardly be as easy as removing all "<<<<", "====" and ">>>>" lines...and please use paste2.org or similar next time...

@faramir118: Hm are you really sure you used a fresh compile of the extractor and had no old files in Building dir?

Because i can't see anything wrong there yet, the liquid header is pretty much written and read again as it is in the original WMO...and at that place i also don't see a possibility to accidently write out of bounds or anything like that... *scratches head*

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