> I'm trying to use the engine callback function GET_BONE_POSITION. > But when I use it I seem to occasionally get an error, > "Mod_Extradata: Precache failed". > > As far as I can tell, this doesn't correspond to getting data from > any particular model or any particular bone in that model; it > seems to be random. Sometimes a call will work, and sometimes the > same call will crash. > > So, has anyone got this to work? Is it just me? Do I need to do > anything special to use this function?
You can find this source code in the Quake 1 source from ftp://ftp.idsoftware.com The Mod_Extradata() function is in QW\client\model.c (Half-Life has almost the exact same source code except it checks to make sure you're not calling the function with a mod_brush (whatever that is! :) Here's the Q1 source... void *Mod_Extradata (model_t *mod) { void *r; r = Cache_Check (&mod->cache); if (r) return r; Mod_LoadModel (mod, true); if (!mod->cache.data) Sys_Error ("Mod_Extradata: caching failed"); return mod->cache.data; } I assume you are getting the "caching failed" message and not "Precache failed" as in your e-mail. Cache_Check() can be found in zone.c (it returns the least recently used (LRU) block from the cache (to make sure there's cache space available?) Mod_LoadModel() (also in model.c) obviously loads the model into cache. I suspect that the times this function is failing, you are running out of cache space. Jeffrey "botman" Broome _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

