Store bone positions inside array from StudioRenderModel
This commit is contained in:
parent
04720aa4a3
commit
1d7d974d88
|
@ -10,6 +10,9 @@
|
||||||
|
|
||||||
enum game_id this_game_id = HL;
|
enum game_id this_game_id = HL;
|
||||||
|
|
||||||
|
/* Bone origins of each player, updated in studiorendermodel */
|
||||||
|
vec3_t g_bones[64][128];
|
||||||
|
|
||||||
void* hw;
|
void* hw;
|
||||||
void** h_client;
|
void** h_client;
|
||||||
DECL_INTF(cl_enginefunc_t, engine);
|
DECL_INTF(cl_enginefunc_t, engine);
|
||||||
|
|
|
@ -81,6 +81,14 @@ int h_HUD_Redraw(float time, int intermission) {
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
void h_StudioRenderModel(void* this_ptr) {
|
void h_StudioRenderModel(void* this_ptr) {
|
||||||
|
/* Update bones array */
|
||||||
|
cl_entity_t* ent = i_enginestudio->GetCurrentEntity();
|
||||||
|
bone_matrix* mat = (bone_matrix*)i_enginestudio->StudioGetBoneTransform();
|
||||||
|
for (int i = 0; i < 128; i++) {
|
||||||
|
const vec3_t bone_orig = matrix_3x4_origin((*mat)[i]);
|
||||||
|
vec_copy(g_bones[ent->index][i], bone_orig);
|
||||||
|
}
|
||||||
|
|
||||||
if (!chams(this_ptr))
|
if (!chams(this_ptr))
|
||||||
ORIGINAL(StudioRenderModel, this_ptr);
|
ORIGINAL(StudioRenderModel, this_ptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ enum game_id {
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
extern game_id this_game_id;
|
extern game_id this_game_id;
|
||||||
|
extern vec3_t g_bones[64][128];
|
||||||
|
|
||||||
extern void* hw;
|
extern void* hw;
|
||||||
extern void** h_client; /* hClientDLL hander */
|
extern void** h_client; /* hClientDLL hander */
|
||||||
|
|
Loading…
Reference in New Issue