[CF-Devel] Item sorting

pstolarc at theperlguru.com pstolarc at theperlguru.com
Sat Jun 8 18:12:32 CDT 2002


I've been working on trying to get the SDL client to use the common
client files.  It's rather a bit of work, as stuff has been renamed
and moved around to different files.  And I'm not going to mention the
added functionality.

Anyway,...

Looking at common/item.c right now, and noticed something in
update_item_sort():

#if 0
	    /* This could be a nice idea, but doesn't work very well if
you
	     * have a few unidentified wands, as the position of a wand
	     * which you know the effect will move around as you equip
others.
	     */

	    /* applied items go first */
	    if (itmp->applied) continue;
	    /* put locked items before others */
	    if (itmp->locked && !it->locked) continue;
#endif

If you sort by itmp->tag first, then everything will appear in a very
consistent order.  But if you equip the "unIDed wand that you know
what it does", then unequip it, you may still lose track of it.  But
though it will move back to exactly the same place it was before you
applied it.  It would even sort stuff consistently if you drop stuff,
then pick it back up, as the tag stays the same.

Just an idea.  Not sure if it's worthwhile or not.

-Philip

    
    


More information about the crossfire mailing list