[CF-Devel] devourers
Mark Wedel
mwedel at scruz.net
Wed May 9 02:01:54 CDT 2001
>
>
void update_priest_flag (object *god, object *exp_ob, uint32 flag) {
>
>
if(QUERY_FLAG(god,flag)&&!QUERY_FLAG(exp_ob,flag))
>
SET_FLAG(exp_ob,flag);
>
else if(QUERY_FLAG(exp_ob,flag)&&!QUERY_FLAG(god,flag))
>
{
>
if (!(QUERY_FLAG(arch_to_object(exp_ob->arch),flag)))
>
CLEAR_FLAG(exp_ob,flag);
>
};
>
}
Err, arch_to_object should not be used, as that ends up creating a nice memory
leak (one for each functiion call).
What you really want to be doing is something like:
if (!(QUERY_FLAG(exp_ob->arch->clone,flag)))
or the like (not sure if it should be .clone there).
Theres already enough memory leaks out there - we don't want to be adding more.
More information about the crossfire
mailing list