ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/player.C
(Generate patch)

Comparing deliantra/server/server/player.C (file contents):
Revision 1.235 by root, Wed Nov 4 17:24:00 2009 UTC vs.
Revision 1.236 by root, Thu Nov 5 14:56:06 2009 UTC

1726 * inv must have been an container and must have been active. 1726 * inv must have been an container and must have been active.
1727 * 1727 *
1728 * Change the color so that the message doesn't disappear with 1728 * Change the color so that the message doesn't disappear with
1729 * all the others. 1729 * all the others.
1730 */ 1730 */
1731 if (pl->contr->usekeys == key_inventory || 1731 if (pl->contr->usekeys == key_inventory
1732 !QUERY_FLAG (container, FLAG_APPLIED) || 1732 || !QUERY_FLAG (container, FLAG_APPLIED)
1733 (pl->contr->usekeys == keyrings && container->race != shstr_keys)) 1733 || (pl->contr->usekeys == keyrings && container->race != shstr_keys))
1734 { 1734 {
1735 new_draw_info_format (NDI_UNIQUE | NDI_BROWN, 0, pl, 1735 new_draw_info_format (NDI_UNIQUE | NDI_BROWN, 0, pl,
1736 "The %s in your %s vibrates as you approach the door", query_name (tmp), query_name (container)); 1736 "The %s in your %s vibrates as you approach the door", query_name (tmp), query_name (container));
1737 return NULL; 1737 return NULL;
1738 } 1738 }
1751{ 1751{
1752 /* If its a door, try to find a key. If we do destroy the door, 1752 /* If its a door, try to find a key. If we do destroy the door,
1753 * might as well return immediately as there is nothing more to do - 1753 * might as well return immediately as there is nothing more to do -
1754 * otherwise, we fall through to the rest of the code. 1754 * otherwise, we fall through to the rest of the code.
1755 */ 1755 */
1756 object *key;
1757
1758 if (door->slaying && is_match_expr (door->slaying))
1759 {
1760 // for match expressions, we try to find the key by applying the match
1761 // to the op itself, which is supposed to find the "key", instead
1762 // of searching through containers ourselves.
1763
1764 key = match_one (door->slaying, op, door, op, op);
1765 }
1766 else
1756 object *key = find_key (op, op, door); 1767 key = find_key (op, op, door);
1757 1768
1758 /* If we found a key, do some extra work */ 1769 /* If we found a key, do some extra work */
1759 if (key) 1770 if (key)
1760 { 1771 {
1761 object *container = key->env; 1772 object *container = key->env;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines