lep / jassdoc

Document the WarCraft 3 API
52 stars 20 forks source link

Update effects.j #97

Closed cipherxof closed 1 year ago

cipherxof commented 1 year ago

The description for BlzSetSpecialEffectHeight is wrong. I can't find any difference between it and BlzSetSpecialEffectZ.

I would guess BlzSetSpecialEffectHeight is supposed to take into account terrain height, but it doesn't.

The decompilation of the two are slightly different but they're both just different ways of applying Z height, with BlzSetSpecialEffectZ simply setting the Z field directly.

BlzSetSpecialEffectHeight

*&a2.x = 0i64;
a2.z = 0.0;
v3 = GetEffectImageSprite(result);
SpriteUber__GetPosition(v3, &a2);
a2.z = *v7;
v5 = a2;
v4 = GetEffectImageSprite(v2);
result = SpriteUber__SetPosition(v4, *&v5.x, v5.z);

BlzSetSpecialEffectZ

LODWORD(v9) = *(result + 148);
v4 = *(result + 152);
v10 = *z;
HIDWORD(v9) = v4;
v5 = (*(*result + 176))(result);
sub_800280(v5, &v9, 1);
v7 = v9;
v8 = v10;
v6 = GetEffectImageSprite(v3);
SpriteUber__SetPosition(v6, v7, v8);