Trinitycore: Destructible GameObjects as a floor

Created on 8 Jun 2017  路  25Comments  路  Source: TrinityCore/TrinityCore

Description:

Some destructible gameobjects that are used as a floor return the wrong floorZ when using .gps command. This leads to creatures falling through them. This is not always the case on the gameobject as on some places it returns the right value.

Current behaviour:
See above.

Expected behaviour:

.gps command should return the right z coordinate

Steps to reproduce the problem:

  1. .go xyz 483.304047 -2168.442627 840.856812 631
  2. .gps
  3. Notice the floorZ value.
  4. Aggro Lich King and let him chase you

Branch(es):

  • 3.3.5
  • master ?

TC rev. hash/commit:

https://github.com/TrinityCore/TrinityCore/commit/107d6260668f825a2a72e7694b43e7940b3c88aa

Operating system: Win10

Branch-3.3.5a Comp-Core Sub-MapMMapVmaps

Most helpful comment

All listed issues fixed by commit cfb0f9f tagged above (thanks for the quick investigation, @Shauren).

All 25 comments

Also happens on 1660bb7d27d6f42b49012a6b57e3c2b2eab20fd3 - not caused by f6c849729b27b77228704b595de3adaf24da2c10.

Console reports

Could not load MMAP name:Icecrown Citadel, id:631, x:31, y:36 (mmap rep.: x:31, y:36)
VMap file './vmaps/631.vmtree' does not exist

(NB: That file does exist. Tagging @Shauren to take a look at underlying VMAP loading code.)

<Shauren> its caused by this
<Shauren> https://github.com/TrinityCore/TrinityCore/commit/c35793941b3aae9b54dce92389aa528d40050754
<Shauren> i think i need to remind you that both ToC floor and LK area are gameobjects
<Shauren> that means no pathfinding
<Shauren> except apparently there is that unrendered WMO spawn there (just like the sota gates) which provided pathfinding (and also blocked it in sota)

Tagging and assigning to @Golrag

I juste made the PR, I am afraid I don't know much about extracting vmaps & wmo's etc and maybe @Warpten would be a better choice for fixing this :/

All listed issues fixed by commit cfb0f9f tagged above (thanks for the quick investigation, @Shauren).

The problem is not fixed to the end, in some places of the platform of the Lich King, the height is taken incorrectly. For example, next to the portal of teleportation.

Portal? What? There is no portal on the platform

There is a portal where players appear on the platform. But on the last rev there everything is fine. There are problems in other places, for example -http://i.prntscr.com/l4X-FnDfSlScezI_9wec2A.jpeg or http://i.prntscr.com/X8eUSvGgQeK5JuUakCu2nQ.jpeg

Confirm @SeTM comment on rev. b2823f388ac3

Here a position where FloorZ != Z
X: 452.136780 Y: -2087.799805 Z: 840.856934 Orientation: 5.298477
grid[32,28]cell[6,0] InstanceID: 536
ZoneX: 69.298904 ZoneY: 67.391762
0.000000 FloorZ: 825.880737 Have height data (Map: 1 VMap: 0 MMap: 1)
http://imgur.com/a/cAf5c

probably an error in the vertices extracted, ill check it out later (read, after I get back from work)

it this a regression or did it happen with old vmaps?
i looked at the client's render check in wod and up so maybe wotlk/cata had different flags.

by all accounts at least the enum used by the extractors was completely wrong, i updated it to the one used in the vanilla pdb

if i were to guess its probably https://github.com/TrinityCore/TrinityCore/commit/c35793941b3aae9b54dce92389aa528d40050754#diff-97edc20817c42622adaefabfd511126fR351
which would mean, fuck me. should be straightforward to doublecheck and fix, when i get home

[] we still need to figure out how to select only the most outward geometry in wmos and strip the rest because before that commit, sota gates had collision geometry + details on the door loaded, resulting in piss heavy shit.

Yes the issue was introduced by https://github.com/TrinityCore/TrinityCore/commit/c35793941b3aae9b54dce92389aa528d40050754#diff-97edc20817c42622adaefabfd511126fR351
It wasn't happen with the old vmaps.

\

for later:

collidable faces: flags & 8 || (flags & 36) == 32
trans faces: flags & 1 && flags & 0x24
render faces: flags & 36 == 32
detail faces: flags & 4
group collision faces :flags & 8

nocamcollide: flags & 2
group color : flags & 8

render modes:
0 cf
1 df
2 rf
3 tf
4 c
5 ncc
6 tx
7 gc
8 opaque default

So we must revert the commit?

Let @Warpten deal with it.

This makes LK encounter almost unbearable... can we give some priority?

@Warpten I removed this part of the code

bool isRenderFace = (MOPY[2 * i] & WMO_MATERIAL_RENDER) && !(MOPY[2 * i] & WMO_MATERIAL_DETAIL);
bool isDetail = (MOPY[2 * i] & WMO_MATERIAL_DETAIL) != 0;
bool isCollision = (MOPY[2 * i] & WMO_MATERIAL_COLLISION) != 0;

if (!isRenderFace && !isDetail && !isCollision)
    continue;

and restored the previous check (with updated enum names) and it 'seems' to fix the issue. Sadly I know nothing about this code and I am not sure about any of this :p

if (MOPY[2 * i] & WMO_MATERIAL_DETAIL || !(MOPY[2 * i] & (WMO_MATERIAL_COLLISION | WMO_MATERIAL_RENDER)))
    continue;
  • LK Platform fixed (with given coordinates)
  • Sota LoS is working as intended now

  • Tested ToC with the worms, one of them is always going a little bit under the floor but when using .gps on the exact same coordinates above the floor, it show the right ones so my guess here is some kind of scripting problem.
    For those wondering:
    those were the coordinates of the NPC when he was emerging back from the ground
    .go xyz 574.321594 165.828339 383.395660 use some higher z value if you don't want to spawn in/under the floor :p

Only thing I'm not sure about is this: When standing on the solid part of the pillars on LK platform it will still show FloorZ on the platform instead of the solid part of the pillar. While before I made the changes that I described above, it would show the correct ones so I'm not really sure which of the two are the indended behaviours.
http://i.imgur.com/xvGqDnk.jpg

Edit: yea issue with ToC is script related
Should check for a good z position instead of just moving to an underground one (which is will always be the same in the current script)
Bugged coordinate: 527.056091 168.795181 393.837006

If you have a cataclysm client, use https://github.com/Warpten/MeshViewer.
a. Enter world
b. Inject into client (button in app)
c. go to platform (it doesn't like you changing maps on the fly)
d. load geometry

you will get the geometry that the server sees. bonus, the view moves as you move ingame

If you use 335 i can MAYBE cook up a fixed version but as of right now its gonna need to be cata
i have a local copy that supports multiversion better but stability sucks ass and i never tested it on anything other than cata.

I don't have a cata client :p
Found this also https://wowdev.wiki/WMO/v17#MOPY_chunk which made me want to create a PR already as I was more certain about the fix

you can also open tile 6313631 in jackpoz's recastdemo https://github.com/jackpoz/recastnavigation

mmaps_generator 631 --debugOutput true tried this command, but couldn't find 6313631
6313530 was the last value I could select in the list

you can select a specific tile too.. for some reason the mmaps gen is very iffy. i never got to actually have it generate good sota tiles unless i asked for a tile with the specific door

This is still present on stock TC.
2 ways to reproduce:

  • TOC10 -> Worms emerge up from ground, see how they're stuck beneath
  • ICC10 -> Raging spirits phase 2, see how theyre spawned and stuck beneath (only first one though..)

9614f9d

Was this page helpful?
0 / 5 - 0 ratings