I had written some custom bots for my TFC and DM servers and along the way started getting into much more "admin mod" like features, like special effects, shaking, fades, glows, client command filtering, voting, sound effects, using custom sprites/sounds, stats tracking, and was having a lot of fun doing it. I got into DOD recently and found it would be kind of neat to use this on DOD as well. Everything worked great on the TFC / DM side, but the server crashed with my mod using DOD.. so I started doing some investigating trying to find out the cause of the crash... I removed all custom code except some log code (using your template) because I figured this would be a safe way to start. So the subroutines generally look like this:
void StartFrame( void )
{
fp=fopen("log.txt","a"); fprintf(fp, "StartFrame\n"); fclose(fp);
(*other_gFunctionTable.pfnStartFrame)();
}
void ClientCommand( edict_t *pEntity )
{
fp=fopen("log.txt","a"); fprintf(fp, "ClientCommand\n"); fclose(fp);
(*other_gFunctionTable.pfnClientCommand)(pEntity);
}
etc etc
so you can see there's nothing there except logging to make sure the engine passed through there...
I did this for every subroutine, hoping I could catch where something might cause a crash, but now the server doesn't crash at all...
added this to h_export:
else if (strcmpi(mod_name, "dod") == 0)
{
mod_id = DOD_DLL;
#ifndef __linux__
strcpy(game_dll_filename, "dod\\dlls\\dod.dll");
#else
strcpy(game_dll_filename, "dod/dlls/dod_i386.so");
#endif
}
added this to linkfunc:
// DAY OF DEFEAT
LINK_ENTITY_TO_FUNC(info_gameplaylogic);
basically my dll became nothing but a passthrough...
after doing these things the server stopped crashing, and I could change maps, do all console commands etc with no problems. but now the client gets past precaching, and then when it gets to "Parsing game info..." the client (not the server) just quits. Doesn't crash or report an error (that I can see) it just quits. The server keeps going happily along (this is using hlds win32) and just reports Dropped Player from server Reason: Timed out. So what I suspect is that the client is not getting something it is asking for from the server, and just quitting, but the server doesn't show any problems, and the client, well that leads me back to my original post, why's the client just quitting?
PMB: As to meta-mod, I don't use it because I learned using the template, and I really don't want to re-learn another method of doing the mods.. besides this way I just worry about sdk updates, not sdk and meta-mod.. I dunno who metamod is written by but if they decide to stop someday, but the engine gets updated, don't all metamod plugins then break?
I like just talking to the engine directly, kind of old fashioned i guess
Anyway, any ideas what I might be overlooking? Something simple probably...
Thanks!
B4F
P.S. My Steam HLDS dod is completely up to date using the update tool.