On Sun, 10 Feb 2002, Patrick Dughi wrote: > Either way, you can tell which is which because pulsed commands will > have ch == 'me', cmd is 0, and the argument is NULL. Command triggers > have ch == person who triggered it (could be 'me', but unlikely), a > valid cmd, though having an argument or not is uncertain. Special procedures are invoked by perform_violence() since, essentially, 3.0's inception. You can see the call in 3.0bpl4's perform_violence() function. It has also, unfortunately, always had the same call semantics as the mobile_activity() invocations, which is what I'm intending to address. By changing the call semantics to differentiate between PULSE_MOBILE and PULSE_VIOLENCE invocations, we cover a slight hole in spec procs. Some special procedures will have to change because of this. Particularly, the violent behavior spec procs like magic_user(), which rely on ch being the mobile on which the spec proc is running. Given the new semantics, I believe the following are definitive checks for the possible situations: struct char_data *mob = me; if (cmd) /* Invoked by a command. */ ; if (ch == mob) /* Invoked by PULSE_MOBILE. */ ; if (ch == FIGHTING(mob)) /* Invoked by PULSE_VIOLENCE. */ ; -dak -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT