Andreas Kirschbaum wrote: > Salathar wrote: > >> There probably was or still is a reson for pl != NULL checks, maybe >> the code should be something like: >> >> if (pl!=NULL && draw_exit) { >> if !(QUERY_FLAG(pl->ob,FLAG_WIZ) && pl->ob->contr->hidden) >> new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, >> NULL, buf); >> } > > > I'd rather merge this statement into the previous if(pl!=NULL) block: > > if (pl!=NULL) { > > [...] > > if (draw_exit) { > if (!QUERY_FLAG(pl->ob, FLAG_WIZ) || !pl->ob->contr->hidden) { > new_draw_info(NDI_UNIQUE|NDI_ALL|NDI_DK_ORANGE, 5, NULL, buf); > } > } > } Yes - that makes more sense. Whether to have two if statements is more an issue of styl - I don't see any reason that couldn't just be one if statement, since the code isn't doing anything else if draw_exit is set. _______________________________________________ crossfire-devel mailing list crossfire-devel at lists.real-time.com https://mailman.real-time.com/mailman/listinfo/crossfire-devel