Skip to content

Commit

Permalink
[SP] Match R_LerpTag with MP API
Browse files Browse the repository at this point in the history
  • Loading branch information
SomaZ committed Oct 4, 2023
1 parent 12e6d73 commit e40982b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/rd-common/tr_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ typedef struct {
int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer );

//model stuff
void (*LerpTag)( orientation_t *tag, qhandle_t model, int startFrame, int endFrame,
int (*LerpTag)( orientation_t *tag, qhandle_t model, int startFrame, int endFrame,
float frac, const char *tagName );
void (*ModelBounds)( qhandle_t model, vec3_t mins, vec3_t maxs );

Expand Down
2 changes: 1 addition & 1 deletion code/rd-vanilla/tr_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ Ghoul2 Insert End

void R_ModelInit (void);
model_t *R_GetModelByHandle( qhandle_t hModel );
void R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFrame,
int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFrame,
float frac, const char *tagName );
void R_ModelBounds( qhandle_t handle, vec3_t mins, vec3_t maxs );

Expand Down
7 changes: 4 additions & 3 deletions code/rd-vanilla/tr_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ static md3Tag_t *R_GetTag( md3Header_t *mod, int frame, const char *tagName ) {
R_LerpTag
================
*/
void R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFrame,
int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFrame,
float frac, const char *tagName ) {
md3Tag_t *start, *finish;
int i;
Expand All @@ -1135,13 +1135,13 @@ void R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFra
{
AxisClear( tag->axis );
VectorClear( tag->origin );
return;
return qfalse;
}

if ( !start || !finish ) {
AxisClear( tag->axis );
VectorClear( tag->origin );
return;
return qfalse;
}

frontLerp = frac;
Expand All @@ -1156,6 +1156,7 @@ void R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFra
VectorNormalize( tag->axis[0] );
VectorNormalize( tag->axis[1] );
VectorNormalize( tag->axis[2] );
return qtrue;
}


Expand Down

0 comments on commit e40982b

Please sign in to comment.