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

Comparing deliantra/server/common/object.C (file contents):
Revision 1.196 by root, Wed Oct 17 22:01:27 2007 UTC vs.
Revision 1.197 by root, Wed Oct 17 22:04:31 2007 UTC

1952 * activate recursively a flag on an object inventory 1952 * activate recursively a flag on an object inventory
1953 */ 1953 */
1954void 1954void
1955flag_inv (object *op, int flag) 1955flag_inv (object *op, int flag)
1956{ 1956{
1957 if (op->inv)
1958 for (object *tmp = op->inv; tmp != NULL; tmp = tmp->below) 1957 for (object *tmp = op->inv; tmp; tmp = tmp->below)
1959 { 1958 {
1960 SET_FLAG (tmp, flag); 1959 SET_FLAG (tmp, flag);
1961 flag_inv (tmp, flag); 1960 flag_inv (tmp, flag);
1962 } 1961 }
1963} 1962}
1964 1963
1965/* 1964/*
1966 * deactivate recursively a flag on an object inventory 1965 * deactivate recursively a flag on an object inventory
1967 */ 1966 */
1968void 1967void
1969unflag_inv (object *op, int flag) 1968unflag_inv (object *op, int flag)
1970{ 1969{
1971 if (op->inv)
1972 for (object *tmp = op->inv; tmp != NULL; tmp = tmp->below) 1970 for (object *tmp = op->inv; tmp; tmp = tmp->below)
1973 { 1971 {
1974 CLEAR_FLAG (tmp, flag); 1972 CLEAR_FLAG (tmp, flag);
1975 unflag_inv (tmp, flag); 1973 unflag_inv (tmp, flag);
1976 } 1974 }
1977} 1975}
1978 1976
1979/* 1977/*
1980 * find_free_spot(object, map, x, y, start, stop) will search for 1978 * find_free_spot(object, map, x, y, start, stop) will search for
1981 * a spot at the given map and coordinates which will be able to contain 1979 * a spot at the given map and coordinates which will be able to contain

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines