Mr. Oho: thanks for all of your help. It turns out that ioQuake wasn't running from the dlls.
So far, I've been able to successfully stream regions of interest (ROIs) to disk -- essentially the top-left and bottom-right coordinates of the bounding box as projected on the screen. I've also been able to filter out the data based on whether on not an entity is visible or not (e.g. behind a wall). I've accomplished this all within CG_DrawActiveFrame.
My next step is that I would like to be able to write to disk when an entity is spawned and when it dies. Ideally, I'd like to be able to use the spawning function to give an entity a unique identifier, such as the system clock time, and use that to tag ROIs.
At this point, I'm having problems figuring out what function is called every time an entity is spawned. I've put code snippets into CleintSpawn() and G_AddBot(). In my code, I've added some lines to respective functions that write "client spawned" or "Bot spawned" messages to disk.
Here is an example of the first two clines of my text file. This is after I played a quick round of the single player game.
client spawned: 'noclass', serverTime =600, index = 1
client spawned: 'noclass', serverTime =650, index = 0
and here is the code that produces it:
void ClientSpawn(gentity_t *ent)
{
...
// find a spawn point
// do it before setting health back up, so farthest
// ranging doesn't count this client
if ( client->sess.sessionTeam == TEAM_SPECTATOR )
{... }
else if (g_gametype.integer >= GT_CTF )
{... }
else
{...
}
//------
trap_FS_FOpenFile( "EntityLocations.dat", &f, FS_APPEND );
Q_snprintf(tempString, 512, "client spawned: '%s', serverTime =%d, index = %d\n",
ent->classname,
level.time, //client->pers.cmd.serverTime,
index
);
trap_FS_Write(tempString, strlen(tempString), f );
trap_FS_FCloseFile( f );
There are two interesting things to note: (1) I get two client messages right at the beginning, and (2) I get no bot messages. In this game I made sure I killed two enemies before quiting. These messages seem to correspond to the enemy respawning:
client spawned: 'player', serverTime =66300, index = 1
client spawned: 'player', serverTime =89850, index = 1
Maybe part of the problem is that I'm misunderstanding the terminology. I assumed that 'client' meant a person -- in single-player mode, that would be me. Is a client also a bot? Is that why I get those later messages? Also, G_AddBot() must not be getting called, because I'm not getting an messages in my text file with "bot" in them.
thanks,
Matt