--- deliantra/server/server/commands.C 2010/04/10 04:54:09 1.66 +++ deliantra/server/server/commands.C 2012/01/03 11:25:36 1.70 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2002 Mark Wedel & Crossfire Development Team * Copyright (©) 1992 Frank Tore Johansen * @@ -93,7 +93,7 @@ {"fire" , command_fire , 0.0}, {"fire_stop", command_fire_stop, 0.0}, }; -static const int CommandsSize = sizeof (Commands) / sizeof (CommArray_s); +static const int CommandsSize = array_length (Commands); /* * Wizard commands (for both) @@ -128,7 +128,7 @@ {"summon", command_summon, 0.0}, //{"overlay_save", command_save_overlay, 0.0}, }; -static const int WizCommandsSize = sizeof (WizCommands) / sizeof (CommArray_s); +static const int WizCommandsSize = array_length (WizCommands); static int compare_A (const void *a, const void *b) @@ -187,7 +187,7 @@ { csp = find_command_element (command, Commands, CommandsSize); - if (!csp && QUERY_FLAG (pl, FLAG_WIZ)) + if (!csp && pl->flag [FLAG_WIZ]) csp = find_command_element (command, WizCommands, WizCommandsSize); if (csp)