[Fixed] Mount Item and its .layer

Moderator: POL Developer

Locked
guniu
New User
Posts: 6
Joined: Sat Nov 29, 2008 11:50 am

[Fixed] Mount Item and its .layer

Post by guniu »

I moved to 098 from 097.3 and faced a problem with mounts.
After some time of research this is what I get:
When creating mount object (0xF021) its .layer is set to 25 (when it shouldn't because is laying on the ground). Then I equip it, .layer is still 25 (as it should), and I have a graphic of horse under my char. Now I unequip it, .layer is reseted to 0 (as it should). And now when I try to equip it again, its .layer isn't set to 25, is still 0, but item is somewhere on my char, because its .container is saying that, and I don't have a horse under my ass. Then when I'm trying to move that item, or destroy it, pol crashes with:

Code: Select all

Assertion Failed: chr->is_equipped(this), .\item.cpp, line 1048
Aborting due to assertion failure.
or
Assertion Failed: chr->is_equipped(this), .\item.cpp, line 798
Aborting due to assertion failure.
And it's happening only with this item. I created other item that is mount graphic (lets say 0x3EA4 [frenziedOstard]) and it works all good (has .layer 0 after creation, after equip is 25 and I have ostard under char, and I can do many equip/unequip without errors).
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Re: Mount Item and its .layer

Post by MuadDib »

Workin on it, sent you a test core in PM on forums here with a test core. Use and abuse mounts (and any other special new features you see in the changelog, lol)

Let me know how it works. Seems EquipItem() ignores Mount Object layer manipulation totally, so adjust the code for this.
Locked