display_practice issue
< Newer Topic
:: Older Topic >
Pages:<< prev 1 next >>
#1 Jan 4, 2025 9:28 pm
Geomancer
GroupAdministrators
Posts1,982
JoinedJul 26, 2005
So maybe you have a clue on this one Samson.
display_practice shows very different based on if using pager or not using pager.
I'm going to shorten it to compare the two and the problems should be noticed easier than full display.
Pager on display
Without pager on
My guess is it is something when sending the output to the character on large strings when pager is off.
display_practice shows very different based on if using pager or not using pager.
I'm going to shorten it to compare the two and the problems should be noticed easier than full display.
Pager on display
crystal blades ( Superb) cure blindness ( Superb) cure critical ( Superb) cure light ( Superb) cure poison ( Superb) cure serious ( Superb) ghoulish touch ( Superb) goodberry ( Superb) grounding ( Superb) group armor ( Superb) group float ( Superb) group fly ( Superb) recharge ( Superb) refresh ( Superb) rejuvenate ( Superb) remove curse ( Superb) remove invis ( Superb) remove paralysis ( Superb) wizardeye ( Superb) word of recall ( Superb) wraithform ( Superb) ---------------------------------[ Skills ]----------------------------------- deathsong ( Superb) detonate ( Superb) discern scent ( Superb) drow fire ( Superb) elemental synergy ( Superb) elvensong ( Superb) ---------------------------------[ Tongues ]----------------------------------- centaur ( Superb) common ( Superb) dwarven ( Superb) elvish ( Superb) gith ( Superb) gnomish ( Superb)
Without pager on
crystal blades ( Superb) cure blindness ( Superb) cure critical ( Superb) cure light[0;32m( Superb) cure poison ( Superb) cure serious ( Superb) ghoulish touch ( Superb) goodberry ( Superb) grounding( Superb) group armor ( Superb) group float ( Superb) group fly ( Superb) recharge ( Superb) refresh ( Superb) rejuvenate ( Superb) remove curse ;32m( Superb) remove invis ( Superb) remove paralysis ( Superb) wizardeye ( Superb) word of recall ( Superb) wraithform ;32m( Superb) ---------------------------------[ Skills ]----------------------------------- deathsong ( Superb) detonate ( Superb) discern scent ( Superb) dro fire ( Superb) elemental synergy ( Superb) elvensong ( Superb) ---------------------------------[ Tongues ]----------------------------------- centaur ( Superb) common ( Superb) dwarven ( Superb) elvish ( Superb) gith ( Superb) gnomish ( Superb)
My guess is it is something when sending the output to the character on large strings when pager is off.
#2 Jan 4, 2025 10:26 pm
Geomancer
GroupAdministrators
Posts1,982
JoinedJul 26, 2005
ok this seems to fix it
/* * Low level output function. */ bool descriptor_data::flush_buffer( bool fPrompt ) { /* * If buffer has more than 4K inside, spit out .5K at a time -Thoric * * Samson says: Lets do 4K chunks! */ if( !mud_down && this->outbuf.length( ) > 4095 ) { char buf[4096]; memcpy( buf, this->outbuf.c_str( ), sizeof( buf ) ); this->outbuf = this->outbuf.substr( sizeof( buf ), this->outbuf.length( ) - strlen( buf ) ); if( snoop_by ) { buf[4095] = '\0'; // Holds the record for the longest standing bug that never got spotted. Because GCC should have had ways to see this sooner! if( character && character->name ) { if( original && original->name ) snoop_by->buffer_printf( "%s (%s)", character->name, original->name ); else snoop_by->write_to_buffer( character->name ); } snoop_by->write_to_buffer( "% " ); snoop_by->write_to_buffer( buf ); } if( !this->write( buf ) ) return false; return true; } /* * Bust a prompt. */ if( fPrompt && !mud_down && connected == CON_PLAYING ) { char_data *ch; ch = original ? original : character; if( ch->has_pcflag( PCFLAG_BLANK ) ) write_to_buffer( "\r\n" ); if( !ch->isnpc( ) ) prompt( ); else write_to_buffer( ANSI_RESET ); if( ch->has_pcflag( PCFLAG_TELNET_GA ) ) write_to_buffer( (const char*)go_ahead_str ); } /* * Short-circuit if nothing to write. */ if( this->outbuf.empty( ) ) return true; /* * Snoop-o-rama. */ if( snoop_by ) { /* * without check, 'force mortal quit' while snooped caused crash, -h */ if( character && character->name ) { /* * Show original snooped names. -- Altrag */ if( original && original->name ) snoop_by->buffer_printf( "%s (%s)", character->name, original->name ); else snoop_by->write_to_buffer( character->name ); } snoop_by->write_to_buffer( "% " ); snoop_by->write_to_buffer( outbuf ); } /* * OS-dependent output. */ if( !this->write( this->outbuf.c_str( ) ) ) { this->outbuf.erase( ); return false; } this->outbuf.erase( ); return true; }
Pages:<< prev 1 next >>