Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: BUG: Morks Tower



Jan Echternach wrote:

> The attached patch modifies parse_message() to recognize '@connected'
> lines immediately after '@match' lines.  It also fixes several memory
> leaks and null pointer dereferences for incorrectly formatted messages
> (maybe you want to rewrite it completely as it's still very ugly).  But
> note that the patch is completely untested (I'm still working on the
> apply() rewrite, my local tree is in the middle of nowhere and can't be
> compiled any time soon) and incomplete.  A push_connected_objects()
> function is missing that is similar to push_button() but takes the
> 'connected' number as an argument, not an object pointer.  I won't have
> time to finish this patch, but somebody else may take it as a start.

 Note that I think such a change could have dangerous side affects.

 For example, consider that monster that is connected to something.  Player
comes in and charms it or otherwise makes it his follower.  They then wander to
some other map, player says the magic keyword, and some door is triggered.

 Granted, this is pretty esoteric, but perhaps not as unlikely as some might
thing - most connected values tend to be within a fairly narrow range - you may
even get some unintended consequences.

 A better solution (but harder) would be to have monsters trigger handles that
they are standing on - that way friendly players could say the magic word, while
agressive players could just kill the creature and trigger the handle.
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]