find_player.c

ds2.10/fluffos-2.16-ds05/testsuite/single/tests/efuns/find_player.c · 468 B

From the archive ds2.10.zip

Download the archive   « Back to the archive contents

void do_tests() {
#ifndef __NO_ADD_ACTION__
    object tp;
    object o1, o2;

    if (this_player()) {
        ASSERT(!find_player("bar"));
        SAVETP;
        enable_commands();
        set_living_name("bar");
        o1 = find_player("bar");
        exec(this_object(), tp);
        o2 = find_player("bar");
        exec(tp, this_object());
        disable_commands();
        RESTORETP;
        ASSERT(!o1);
        ASSERT(o2 == this_object());
    }
#endif
}

Site Stats

Snippets: 1791
Codebases: 571