This is a multi-part message in MIME format. -- Hi again, I took a look at the sample code and managed to compile a server-side StudioModelRenderer. One thing I noticed when running was that the pointer to the engine_studio_api_s struct (struct engine_studio_api_s *pstudio) seems corrupt or just plain invalid. I copied it over to another struct and tried to call a function, no deal. Are we supposed to be able to use that interface?
Basically all I needed the code for was to retrieve the proper world position of an attachment point in the model server side. Would you have any pointers for setting the bone up and transforming it? I'm kind of at a loss.. I've included the attachments concerning this server side blending that Eric Smith sent originally. Georges -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ken Birdwell Sent: Tuesday, February 05, 2002 5:59 PM To: '[EMAIL PROTECTED]' Subject: RE: [hlcoders] GetAttachment for server-side collision detection See Eric Smith's message of 1/24/02. _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- // common\r_studioint.h // server blending #define SV_BLENDING_INTERFACE_VERSION 1 typedef struct sv_blending_interface_s { int version; void ( *SV_StudioSetupBones )( struct model_s *pModel, float frame, int sequence, const vec3_t angles, const vec3_t origin, const byte *pcontroller, const byte *pblending, int iBone, const edict_t *pEdict ); } sv_blending_interface_t; -- // dlls\animation.cpp #include "com_model.h" #include "r_studioint.h" void SV_StudioSetupBones( struct model_s *pModel, float frame, int sequence, const vec3_t angles, const vec3_t origin, const byte *pcontroller, const byte *pblending, int iBone, const edict_t *pEdict ); // The simple blending interface we'll pass back to the engine sv_blending_interface_t svBlending = { SV_BLENDING_INTERFACE_VERSION, SV_StudioSetupBones }; // Global engine <-> studio model code interface server_studio_api_t IEngineStudio; studiohdr_t *g_pstudiohdr; float (*g_pRotationMatrix)[3][4]; float (*g_pBoneTransform)[MAXSTUDIOBONES][3][4]; /* ==================== Server_GetBlendingInterface Export this function for the engine to use the blending code to blend models ==================== */ #ifdef _WIN32 extern "C" int __declspec( dllexport ) Server_GetBlendingInterface( int version, struct sv_blending_interface_s **ppinterface, struct engine_studio_api_s *pstudio, float (*rotationmatrix)[3][4], float (*bonetransform)[MAXSTUDIOBONES][3][4] ) #else extern "C" int Server_GetBlendingInterface( int version, struct sv_blending_interface_s **ppinterface, struct engine_studio_api_s *pstudio, float (*rotationmatrix)[3][4], float (*bonetransform)[MAXSTUDIOBONES][3][4] ) #endif { if ( version != SV_BLENDING_INTERFACE_VERSION ) return 0; // Point the engine to our callback *ppinterface = &svBlending; // Copy in engine helper functions memcpy( &IEngineStudio, pstudio, sizeof( IEngineStudio ) ); g_pRotationMatrix = rotationmatrix; g_pBoneTransform = bonetransform; // Success return 1; } . . . // blending function used by the server to blend the models (for hitbox purposes) void SV_StudioSetupBones( struct model_s *pModel, float frame, int sequence, const vec3_t angles, const vec3_t origin, const byte *pcontroller, const byte *pblending, int iBone, const edict_t *pEdict ) { // your blending code here... . . . } -- _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders