May you please check the type of exception thrown?(catch (const std::exception& e) { std::cerr <<typeid (e).name() << ":" << e.what() ; }
class std::bad_alloc:bad allocation
So, new ModelInstance[97987] fails.
Did I not chat with you and said I will have a look? I realy dont like the sound of this sentence.It seams that I am an lazy idiot who don´t spend any time for this community. I should reconsider my engagement.If you know an solution, tell me what to change. Save code did not change since sdl in repo.
MCRF sub-chunkA list of with MCNK.nDoodadRefs + MCNK.nMapObjRefs indices into the file's MDDF and MODF chunks, saying which MCNK subchunk those particular doodads and objects are drawn within. This MCRF list contains duplicates for map doodads that overlap areas.As both, WMOs and M2s are referenced here, they get doodad indices first, then WMOs. If you have a doodad and a WMO in the ADT as well as the MCNK, you will have a {0,0} in MCRF with nDoodadRefs and MCNK.nMapObjRefs being 1.The client uses those MCRF-entries to calculate collision. Only objects which are referenced in the current chunk of the toon get checked against collision (this is only for MDX, WMO seem to have different collision). If a doodad entry from MDDF or MODF gets never referenced in a chunks MCRF it wont be drawn at all, WoW doesnt take the MDDF and MODF to draw the objects.
Find a way to fix this:WMOs objects have three coordinates in the ADT.The XYZ coordinates that set the position of the objects, and then some "upper" and "lower" xyz coordinates.These coordinates must have a wide range of difference between the xyz position coords.Problem is that noggit saves the upper and lower coordinates with very low values.I had the vmaps problem with the stranglethon arena in a customized map, so i opened the blizz map where there is the arena in gurubashi, using the hex editor, and check the difference between the xyz position coordinates and the upper and lower coordinates.I found that in the blizz map, the difference between the xyz coords and the upper and lower coords (for the strangleton arena) are aproximately:x: +- 243y: +- 190z: +- 10This means that if the x coord is 300, for example, the upper x must be aprox 543 and the lower 57.Smaller wmos.. like walls or things like that, have an less range, like +-12 for X(Noggits only set +-1 difference for all the xyz coords)Properly setting this with an hex editor or taliis (previously veryfing properly the correct differences of the wmo in an blizz map), we resolved the issue of vmaps in our wmo. Is a pain in the ass to fix every wmo in the map (specially if resave our map)... but at least we know how to do it now...However, the vmaps doenst work with the m2... still i dont know how to fix that.Regards.