Sit down and consider all the functions that send text to a player and
when. send_to_char does not append \n\r by default, but
write_to_buffer (which send_to_char calls) conditionally can:
/*
* Append onto an output buffer.
*/
void write_to_buffer (DESCRIPTOR_DATA * d, const char *txt, int length)
{
/*
* Find length in case caller didn't.
*/
if (length <= 0)
length = strlen (txt);
/*
* Initial \n\r if needed.
*/
if (d->outtop == 0 && !d->fcommand)
{
d->outbuf[0] = '\n';
d->outbuf[1] = '\r';
d->outtop = 2;
}
...
Consider modifiying write_to_buffer and add a new condition so \n\r is
not tacked on. Or you can lazily set d->fcommand, but I am not sure of
the implications for that. Keep in mind that write_to_buffer doesn't
actually send text to players. I mentioned 'when' because
write_to_descriptor is what actually writes text to a descriptor
(socket), and it is called intermittently by game_loop_X, where X
depends on what O/S ROM is running/compiled on.
Rainer Roomet wrote:
Hello Everyone.
I made somethin in comm.c and I get visible delays. But there is one
thing what dosen't like me:
The code is :
if ( d->character != NULL && d->character->wait > 0 )
{
--d->character->wait;
send_to_char(".", d->character);
continue;
}
and result is:
^ Mana:Perfect >rege
Ok.
You have been restored
You have to wait about 5 seconds.
.
.
.[ADVICE :: Use 'map' to find your current location in the Middle-Earth.]
.
.
.
.
^ >You have 0 gold pennies. (7,250,000 exp to level)
These points were pulses but I don't like these 'to next line'. I want
the points have to be same line! not at next. Anyone can help me ?
-- Ranka
telnet://irc.nohik.ee on port 4242
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail