Message
| Well, I worked it out, but it wasn't simple. :)
The same thing happened with a fresh compile of SMAUG FUSS, so it isn't anything you did.
It was a straight bug. :)
In nanny in comm.c, in the section CON_GET_WANT_RIPANSI, around line 1986 is this code:
ch->position = POS_STANDING;
d->connected = CON_PRESS_ENTER;
set_pager_color( AT_PLAIN, ch );
... and a little further on ...
if ( IS_IMMORTAL(ch) )
do_help( ch, "imotd" );
if ( ch->level == 50)
do_help( ch, "amotd" );
if ( ch->level < 50 && ch->level > 0 )
do_help( ch, "motd" );
if ( ch->level == 0 )
do_help( ch, "nmotd" );
send_to_pager( "\n\rPress [ENTER] ", ch );
This is supposed to set the colour for the NMOTD help topic to AT_PLAIN (grey), however inside set_pager_color is:
ch->desc->pagecolor = ch->colors[AType];
If you look at the variable "ch" at this point (in gdb) you see this:
(gdb) p *ch
$1 = {next = 0x0, prev = 0x0, next_in_room = 0x0, prev_in_room = 0x0,
master = 0x0, leader = 0x0, fighting = 0x0, reply = 0x0, retell = 0x0,
switched = 0x0, mount = 0x0, hunting = 0x0, fearing = 0x0, hating = 0x0,
spec_fun = 0, mpact = 0x0, mpactnum = 0, mpscriptpos = 0, pIndexData = 0x0,
desc = 0x8580ed0, first_affect = 0x0, last_affect = 0x0, pnote = 0x0,
comments = 0x0, first_carrying = 0x0, last_carrying = 0x0, in_room = 0x0,
was_in_room = 0x0, pcdata = 0x8583268, last_cmd = 0, prev_cmd = 0,
dest_buf = 0x0, alloc_ptr = 0x0, spare_ptr = 0x0, tempnum = 0, editor = 0x0,
first_timer = 0x0, last_timer = 0x0, morph = 0x0, name = 0x8520ac8 "myname",
short_descr = 0x821ab18 "", long_descr = 0x821ab18 "",
description = 0x821ab18 "", num_fighting = 0, substate = 0, sex = 1,
class = 0, race = 0, level = 0, trust = 0, played = 0, logon = 1075606456,
save_time = 0, timer = 0, wait = 0, hit = 20, max_hit = 20, mana = 100,
max_mana = 100, move = 100, max_move = 100, practice = 0, numattacks = 0,
gold = 0, exp = 0, act = {bits = {33556032, 0, 0, 0}}, affected_by = {
bits = {0, 0, 0, 0}}, no_affected_by = {bits = {0, 0, 0, 0}},
carry_weight = 0, carry_number = 0, xflags = 0, no_immune = 0,
no_resistant = 0, no_susceptible = 0, immune = 0, resistant = 0,
susceptible = 0, attacks = {bits = {0, 0, 0, 0}}, defenses = {bits = {0, 0,
0, 0}}, speaks = 1, speaking = 1, saving_poison_death = 0,
saving_wand = 0, saving_para_petri = 0, saving_breath = 0,
saving_spell_staff = 0, alignment = 0, barenumdie = 1, baresizedie = 4,
mobthac0 = 0, hitroll = 0, damroll = 0, hitplus = 0, damplus = 0,
position = 12, defposition = 0, style = 2, height = 72, weight = 180,
armor = 100, wimpy = 0, deaf = 0, perm_str = 13, perm_int = 13,
perm_wis = 13, perm_dex = 13, perm_con = 13, perm_cha = 13, perm_lck = 13,
mod_str = 0, mod_int = 0, mod_wis = 0, mod_dex = 0, mod_con = 0,
mod_cha = 0, mod_lck = 0, mental_state = -10, emotional_state = 0,
retran = 0, regoto = 0, mobinvis = 0, colors = {0 <repeats 96 times>}}
Important part in bold. In other words, we are sending AT_PLAIN to the player however the player's colours are not set up yet (all 96 are zero). Thus we send black-on-black as the colour for the help text.
The solution appears to be to set up the default colours when clearing the character data. I did this:
void clear_char( CHAR_DATA *ch )
{
... other stuff here ...
reset_colors (ch);
return;
}
That sets default colours along with other character defaults.
Then, the NMOTD screen appears properly.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|