git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9451
d7cf8633-e32d-0410-b094-
e92efae38249
// FIXME: use a model function to get tag info (need to handle skeletal)
if (e->state_current.tagentity && e->state_current.tagindex >= 1)
{
// FIXME: use a model function to get tag info (need to handle skeletal)
if (e->state_current.tagentity && e->state_current.tagindex >= 1)
{
- if(CL_BlendTagMatrix(&t->render, e->state_current.tagindex - 1, &blendmatrix))
+ if(!CL_BlendTagMatrix(&t->render, e->state_current.tagindex - 1, &blendmatrix)) // i.e. no error
{
// concat the tag matrices onto the entity matrix
Matrix4x4_Concat(&tempmatrix, &t->render.matrix, &blendmatrix);
{
// concat the tag matrices onto the entity matrix
Matrix4x4_Concat(&tempmatrix, &t->render.matrix, &blendmatrix);
int CL_GetEntityLocalTagMatrix(prvm_edict_t *ent, int tagindex, matrix4x4_t *out)
{
int frame;
int CL_GetEntityLocalTagMatrix(prvm_edict_t *ent, int tagindex, matrix4x4_t *out)
{
int frame;
dp_model_t *model;
entity_render_t cheatentity;
if (tagindex >= 0
dp_model_t *model;
entity_render_t cheatentity;
if (tagindex >= 0
cheatentity.model = model;
CL_LoadFrameGroupBlend(ent, &cheatentity);
R_LerpAnimation(&cheatentity);
cheatentity.model = model;
CL_LoadFrameGroupBlend(ent, &cheatentity);
R_LerpAnimation(&cheatentity);
- if(!CL_BlendTagMatrix(&cheatentity, tagindex, out))
- {
+ ret = CL_BlendTagMatrix(&cheatentity, tagindex, out);
+ if(ret)
- return false;
- }
- return true;
}
// Warnings/errors code:
}
// Warnings/errors code:
qboolean CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out);
void CL_LoadFrameGroupBlend(prvm_edict_t *ed, entity_render_t *entrender);
qboolean CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out);
void CL_LoadFrameGroupBlend(prvm_edict_t *ed, entity_render_t *entrender);
-qboolean CL_BlendTagMatrix(entity_render_t *entrender, int tagindex, matrix4x4_t *blendmatrix);
+int CL_BlendTagMatrix(entity_render_t *entrender, int tagindex, matrix5x4_t *blendmatrix); // returns 0 or an error code