[CF-Devel] button.c, bug in multi-tile door animations

Kurt Fitzner kf_bulk at excelcia.org
Fri Sep 6 13:46:01 CDT 2002


Sorry for all the posts.  I'll start making them in digest format to get it
all at once. :)

I've noticed that mine_secret_1_1 and mine_secret_2_1, which are type 26
(timed gate) multi-tile doors don't quite work properly.  The issue is that
only one tile's animation seems to get used on the correct 'connected' value.

I've fixed this with a slight mod to button.c, but I'm not sure if this is the
correct place for it:

    case TIMED_GATE:
        while (tmp) {
            tmp->speed = tmp->arch->clone.speed;
            update_ob_speed(tmp);  /* original values */
            tmp->value = tmp->arch->clone.value;
            tmp->stats.sp = 1;
            tmp->stats.hp = tmp->stats.maxhp;
            tmp = tmp->more;
        }
        break;

Another way to fix is to call add_button_link() for every tile in a muli-tile
archetype that has a connected value.

I noticed that even though the head tile was the only one that activated on
the correct button, that sometimes (without rhyme or reason) the second tile
would get activated.  I only noticed this a handful of times, and I've been
unable to duplicate it in a debugger.  At first I thought maybe the second
tile was getting connected to zero, but that doesn't seem to be the case.

I've made the above change on my server, and it seems to work well, but I'm
not sure that making a change to the loader isn't the more correct solution.

        Kurt.



    
    


More information about the crossfire mailing list