Hello. I tweaked some stuff related to DM & message colors :) Attached patch does the following: * player enter & leave messages use the 'NDI_DK_ORANGE' color * DM enter & leave use the 'NDI_LT_GREEN' color * DMs now see hidden DMs in 'who' command * 'hide' command now also displays DM join & leave messages (because a DM wanting to leave would first need to 'unbecome' DM, and vice versa) * DMs now become visible again immediately when using 'hide' command to unhide (regardless of invisibility spell, probably...) * when a DM teleports to a player, this player won't see the 'you see a portal open' message if the DM is hidden Nicolas -------------- next part -------------- Index: server/apply.c =================================================================== RCS file: /cvsroot/crossfire/crossfire/server/apply.c,v retrieving revision 1.99 diff -u -r1.99 apply.c --- server/apply.c 27 Feb 2004 23:00:27 -0000 1.99 +++ server/apply.c 6 Mar 2004 18:00:47 -0000 @@ -2006,7 +2006,7 @@ } remove_ob(pl); pl->direction=0; - new_draw_info_format(NDI_UNIQUE | NDI_ALL, 5, pl, + new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, pl, "%s leaves the game.",pl->name); /* update respawn position */ Index: server/c_misc.c =================================================================== RCS file: /cvsroot/crossfire/crossfire/server/c_misc.c,v retrieving revision 1.37 diff -u -r1.37 c_misc.c --- server/c_misc.c 20 Jan 2004 05:45:32 -0000 1.37 +++ server/c_misc.c 6 Mar 2004 18:00:50 -0000 @@ -245,18 +245,19 @@ for(pl=first_player;pl!=NULL;pl=pl->next) { if(pl->ob->map == NULL) continue; - if (pl->hidden) continue; + if (pl->hidden && !QUERY_FLAG(op, FLAG_WIZ)) continue; if (pl->state==ST_PLAYING || pl->state==ST_GET_PARTY_PASSWORD) { if(op == NULL || QUERY_FLAG(op, FLAG_WIZ)) - (void) sprintf(buf,"%s the level %d %s (@%s) [%s]%s%s (%d)", + (void) sprintf(buf,"%s the level %d %s (@%s) [%s]%s%s%s (%d)", pl->ob->name, pl->ob->level, (pl->own_title[0]=='\0'?pl->title:pl->own_title), pl->socket.host, pl->ob->map->path, QUERY_FLAG(pl->ob,FLAG_WIZ)?" [WIZ]":"", + pl->hidden?"[HID]":"", pl->peaceful?"Peaceful":"Hostile",pl->ob->count); else (void) sprintf(buf,"%s the %s [%s]%s%s",pl->ob->name, Index: server/c_wiz.c =================================================================== RCS file: /cvsroot/crossfire/crossfire/server/c_wiz.c,v retrieving revision 1.38 diff -u -r1.38 c_wiz.c --- server/c_wiz.c 17 Feb 2004 00:22:24 -0000 1.38 +++ server/c_wiz.c 6 Mar 2004 18:00:53 -0000 @@ -102,17 +102,21 @@ { if (op->contr->hidden) { op->contr->hidden=0; + op->invisible=1; new_draw_info(NDI_UNIQUE, 0,op, "You are no longer hidden from other players"); - op->map->players++; - new_draw_info_format(NDI_UNIQUE | NDI_ALL, 5, NULL, - "%s has entered the game.",op->name); - } + op->map->players++; + new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL, + "%s has entered the game.",op->name); + new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL, + "The Dungeon Master has arrived!"); } else { op->contr->hidden=1; new_draw_info(NDI_UNIQUE, 0,op, "Other players will no longer see you."); - op->map->players--; - new_draw_info_format(NDI_UNIQUE | NDI_ALL, 5, NULL, - "%s left the game.",op->name); + op->map->players--; + new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL, + "The Dungeon Master is gone.."); + new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL, + "%s left the game.",op->name); } return 1; } @@ -446,7 +450,8 @@ EXIT_Y(dummy) = pl->ob->y + freearr_y[i]; enter_exit(op, dummy); free_object(dummy); - new_draw_info(NDI_UNIQUE, 0, pl->ob, "You see a portal open."); + if (!op->contr->hidden) + new_draw_info(NDI_UNIQUE, 0, pl->ob, "You see a portal open."); new_draw_info(NDI_UNIQUE, 0, op, "OK."); return 1; } @@ -1159,7 +1164,7 @@ if (settings.real_wiz == TRUE) CLEAR_FLAG(op, FLAG_WAS_WIZ); op->contr->hidden=0; - new_draw_info(NDI_UNIQUE | NDI_ALL, 1, NULL, + new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL, "The Dungeon Master is gone.."); return 1; } @@ -1215,7 +1220,7 @@ SET_FLAG(op, FLAG_WAS_WIZ); SET_FLAG(op, FLAG_WIZPASS); new_draw_info(NDI_UNIQUE, 0,op, "Ok, you are the Dungeon Master!"); - new_draw_info(NDI_UNIQUE | NDI_ALL, 1, NULL, + new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL, "The Dungeon Master has arrived!"); SET_FLAG(op, FLAG_FLYING); clear_los(op); Index: server/login.c =================================================================== RCS file: /cvsroot/crossfire/crossfire/server/login.c,v retrieving revision 1.45 diff -u -r1.45 login.c --- server/login.c 21 Dec 2003 02:13:46 -0000 1.45 +++ server/login.c 6 Mar 2004 18:00:55 -0000 @@ -673,7 +673,7 @@ } new_draw_info(NDI_UNIQUE, 0,op,"Welcome Back!"); - new_draw_info_format(NDI_UNIQUE | NDI_ALL, 5, NULL, + new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL, "%s has entered the game.",pl->ob->name); /* GROS : Here we handle the LOGIN global event */ evtid = EVENT_LOGIN; Index: server/main.c =================================================================== RCS file: /cvsroot/crossfire/crossfire/server/main.c,v retrieving revision 1.76 diff -u -r1.76 main.c --- server/main.c 13 Sep 2003 05:02:11 -0000 1.76 +++ server/main.c 6 Mar 2004 18:00:58 -0000 @@ -140,7 +140,7 @@ new_draw_info(NDI_UNIQUE, 0,op,buf); new_draw_info(NDI_UNIQUE, 0,op,"Press `?' for help"); new_draw_info(NDI_UNIQUE, 0,op," "); - new_draw_info_format(NDI_UNIQUE | NDI_ALL, 5, op, + new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, op, "%s entered the game.",op->name); if(!op->contr->name_changed) { new_draw_info(NDI_UNIQUE, 0,op,"Note that you must set your name with the name"); @@ -1061,7 +1061,7 @@ } pl->ob->type = DEAD_OBJECT; /* To avoid problems with inventory window */ } - if (pl!=NULL && draw_exit) new_draw_info(NDI_UNIQUE | NDI_ALL, 5, NULL, buf); + if (pl!=NULL && draw_exit) new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL, buf); } int forbid_play() -------------- next part -------------- _______________________________________________ crossfire-devel mailing list crossfire-devel at lists.real-time.com https://mailman.real-time.com/mailman/listinfo/crossfire-devel