edict_T is a typedef created in g_local.h and is used across the entire bots programming. It house many variables and can be considered to be the memory of the bot for many areas. More info at http://developer.valvesoftware.com/wiki/Edict_t In it's creation the edict_T creates additional copies to house the same variables in order to keep track of things like target data. Note to self: * in front of a variable name indicates pointer. -------- g_main.c would appear to be called first I think. Or at least it calls ClientThink, but before that it calls SpawnEntities. ------------- SpawnEntities takes in 3 chars. *mapname, *entities, *spawnpoint. The actual function is in g_spawn.c edict_t is created here first thing (It is called everywhere). Sets aside memory space for item index and lazer index Sets skill level of bot based off of floor (skill->value)? if it exceeds a number (4) it resets to 4. Saves the data. freetags? Sets aside memory for size of level and number of spawn points. recieves other player g_edicts information sets ent... with passed values of world? checks deathmatch/CTF status of world? fixes laser index. Bunch of CTF stuff Two functions to note: PlayerTrail_Init which is found in p_trail.c and ED_CallSpawn ---------- ED_CallSpawn (edict_t *ent) also found in g_spawn.c. Goes through each item and saves the number of each type of item and records all the data for that type of item. Check normal spawn functions? Finishes with g_spawn.c for the moment. -------- ClientThink is then called from g_main.c. edict_t *ent, usercmd_t *cmd are passed. ClientThink is found in p_client.c Checks on the bots current target, and if gone then sets the target value to null? Calculates the bots maximun jumping distance straight up.