View Single Post
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-31-2017 , 09:20   Re: StudioSetupBones Fix for CS
Reply With Quote #19

Ok, I know this is very old

I don't know if there's other thread related to this but after some question that Rirre sent to me, I've checked few things and this is very interesting.


Engine at startup (Host_InitializeGameDLL) set up the blending interface API for game dll (dlsym on gamedll for Server_GetBlendingInterface).

This is what is called on CS library:

PHP Code:
Server_GetBlendingInterface(1, &g_pSvBlendingAPIserver_studio_apirotationmatrixbonetransform
Where

Quote:
Server_GetBlendingInterface: function defined and exported on CS gamedll (server)
g_pSvBlendingAPI: pointer from gamedll for SV_StudioSetupBones
server_studio_api: IEngineStudio on gamedll side
rotationmatrix: g_pRotationMatrix on gamedll side
bonetransform: g_pBoneTransfor on gamedll side
IEngineStudio struct (engine exported)

PHP Code:
struct server_studio_api_s {
        
void *                     (*Mem_Calloc)(intsize_t); /*     0     4 */
        
void *                     (*Cache_Check)(class cache_user_s *); /*     4     4 */
        
void                       (*LoadCacheFile)(char *, class cache_user_s *); /*     8     4 */
        
void *                     (*Mod_Extradata)(class model_s *); /*    12     4 */

        /* size: 16, cachelines: 1, members: 4 */
        /* last cacheline: 16 bytes */
}; 
Anyone that knows how goldsrc API works could handle this. I thing hooking this setup with a small metamod module could be the best way to get SV_StudioSetupBones both on windows and linux.

Also, this is the correct prototype:

PHP Code:
SV_StudioSetupBones(model_s *, floatint, const vec_t  *, const vec_t  *, const byte  *, const byte  *, int, const edict_t  *); 
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito