[Fixed] Mount Item and its .layer
Posted: Sun Mar 01, 2009 7:26 am
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:
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).
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.