namreeb / namigator

An intelligent navigation API for World of Warcraft Alpha, Vanilla, TBC and WotLK
MIT License
49 stars 32 forks source link

Wrong WMO liquids parsing from alpha data #46

Closed devw4r closed 1 year ago

devw4r commented 1 year ago

Stormwind. image

Undercity. image

namreeb commented 1 year ago

Note to self: Azeroth (-8833, 628) for Stormwind. I can't find an obvious explanation for this yet.

namreeb commented 1 year ago

Smaller WMOs from 0.5.3 and 1.12.1 that have MLIQ data, for comparison:

namreeb commented 1 year ago

1.12.1: image

Alpha: image

namreeb commented 1 year ago

For 1.12.1, the MLIQ chunk has a base vertex of (-70.8333, 120.8333, -27.3881588). For 0.5.3, the base vertex is (-54.166, 120.833, -27.38815). The difference here is probably what is setting this off. Note that the y values are the same, and x is shifted to the left by 16.666, which matches visually the screenshots from the previous post. If I manually adjust the base vertex of 0.5.3 to match 1.12.1, this is what comes out:

image

This is technically correct, but not enough to solve the issue. This also does not correct the water in Stormwind.

namreeb commented 1 year ago

For reference: https://wowdev.wiki/WMO#MLIQ_chunk

world\wmo\dungeon\az_deadmines\az_deadmines_a.wmo:

For 0.5.3:

For 1.12.1:

Stormwind:

From 0.5.3:

From 1.12.1:

namreeb commented 1 year ago

Thanks to schlumpf pointing out that this is likely the result of mirroring.

namreeb commented 1 year ago

Should be fixed with https://github.com/namreeb/namigator/commit/bb4a2221cc1671cb059011710dd88c491925a81c