lep / jassdoc

Document the WarCraft 3 API
52 stars 20 forks source link

Document Waygate and Unit Issued Order APIs; clarify GetLocationZ and CreateDestructable pitfall #160

Closed Luashine closed 1 month ago

Luashine commented 1 month ago

This commit has the full testing code for the "delayed destructable height" https://github.com/lep/jassdoc/commit/bbe9760851672b10ada7e1de90679ce2136b6f66

Very much like in #148 , the created destructables delay their "final" position by one tick because it needs for the animation to play.

The why: when you create a destructable it initially spawns in its DEATH animation. If you ask the game for the Z height at that position in the same tick as spawned, it'll give you the value for the death animation height rather than alive animation that you expected

This is the map that does everything automatically and prints that Z results console. I've asked for people to run it in HD to compare against my SD results. I just want to confirm this for myself. Early on this was a major desync reason on Reforged release, actual model animations affected the surface elevation (if walkable destructable) and THAT caused different values between HD and SD players. I have no idea how they solved it exactly, but they did take agree on one value as far as I understand.

war3.w3mod\doodads\cinematic\elevatorpuzzle\elevatorpuzzle.mdx

because this SD model still has different animation heights when compared to HD. And then what if you trigger DIFFERENT animation variations, one that exists in HD but not in SD? I guess that's still a desync even today??

Feel free to review, but before merging please wait until someone has confirmed the test map output on HD.

PlatformHeightTest.zip