OK. It's all here, in case anyone wants to include level cycling in their mods.

There are one new .h and .c file, and small changes to g_main.c, p_client.c and g_save.c.
I really should have moved the motd code out to the .h file as well, but for some reason
Quake2 crashes when I try to pass extern char*s to dunctions for modification... it's not
really that important anyways.

To get anything to work with Quake2 version 3.09 and above (at time of writing, it's 3.10)
you need to #define GAME_API_VERSION 2 in your code somewhere, preferably in game.h where
it originally came from otherwise your compiler will probably complain (I know mine did).

It's all commented, and alterations have been marked with _JOJO.

Specifically, there are #includes and externs at the top of the above files to access a
global variable (a pointer to a string node list). There are changes to InitGame(), at
line 129 of g_save.c, where the level cycle is imported from the text file, and which
only happens once per server. EndDMLevel(), at line 176 of g_main.c, is responsible for
doing the actual level swapping. ClientBeginDeathmatch(edict_t*), at line 706 of
p_client.c, does the MOTD bit. I realise I only need to read the file once, so you could
probably do the loading back in InitGame() and extern out motd[]. Basically, I stole it
from QDevelS and didn't really think too hard about it, apart from the bugfix :(

For the curious, the reason why other MOTD implementations are buggy is due to a small
mistake in the tutorials on QDevelS. They build the motd line-by-line using strcat(),
which tacks the concatenated string onto the original wherever it finds a null character
or at the beginning if it can't find one. When we define motd[], we have no guarantee that
somewhere, it doesn't contain a \0. So if the memory at motd[] contains some garbage with
a trailing null, that garbage will be prepended to your message. D'oh. The only
difference with mine is that I make sure of the first character of the array.

OK. I just cleaned up the code a little more; some of the line numbers above might be
one or two off now. Sorry, I'm sure none of you will have trouble finding the stuff anyway, we're
all big kids here.

Anyway, go forth (no pun) and conquer. Love yas all,

_JoJo.
joel@jra.com.au.

Feel free to mail me and hassle me about stuff.                                                                                                                                                                                                                                                                                                                                                                                                               