I've been thinking about adding a method to the Game_object class called "is_avatar" that returns true if the object is the avatar. Then add "obj->is_avatar()" to the first test in Container_game_object::add. Thoughts?
Also, how does one go about getting write access to the SVN? I've got some time over the next few weeks and would like to help with some of the outstanding issues in Exult.
Fix for "avatar in container" issue?
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Re: Fix for "avatar in container" issue?
Submit them as patches to the patch tracker and we will commit the fixes.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Re: Fix for "avatar in container" issue?
I've submitted a diff. Rather than add a new method, I simply check if the object is an NPC and if so check if the npc number is 0(avatar). If so, container.add returns false rather than continuing so you get a "won't fit" icon and everyone is happy. The diff also resolves the container volume limit when hackmover is enabled. My solution should be safe, it simply forces container.has_room() to return true if hackmover is enabled.
You might be a good man to ask about this one. So I found a bug where you can add items to locked chests if the chest is inside another container. A bit of sleuthing shows that the is_locked flag is never being set in Shape_info, so the checks aren't working when they try to block this. How/where/when is this flag supposed to be set?
You might be a good man to ask about this one. So I found a bug where you can add items to locked chests if the chest is inside another container. A bit of sleuthing shows that the is_locked flag is never being set in Shape_info, so the checks aren't working when they try to block this. How/where/when is this flag supposed to be set?