Cleanup g_cmds.c and add sanity checks
Cleanup g_combat.c and add sanity checks