Fix Gauntlet barrel axis in UI

UI's PositionRotatedEntityOnTag is different than CGame's and
UI has switched pitch/roll for Gauntlet/BFG axis to get it to
look like /close to/ how it looks in CGame.

Making UI use the same *PositionRotatedEntityOnTag and axis as
CGame fixes the Gauntlet blade being wobbly in controls menu.
This commit is contained in:
Zack Middleton 2014-05-18 20:37:43 -05:00
parent daa570c193
commit a3c2f77236
2 changed files with 4 additions and 12 deletions

View file

@ -332,8 +332,8 @@ static void UI_PositionRotatedEntityOnTag( refEntity_t *entity, const refEntity_
}
// cast away const because of compiler problems
MatrixMultiply( entity->axis, ((refEntity_t *)parent)->axis, tempAxis );
MatrixMultiply( lerped.axis, tempAxis, entity->axis );
MatrixMultiply( entity->axis, lerped.axis, tempAxis );
MatrixMultiply( tempAxis, ((refEntity_t *)parent)->axis, entity->axis );
}
@ -845,10 +845,6 @@ void UI_DrawPlayer( float x, float y, float w, float h, playerInfo_t *pi, int ti
angles[YAW] = 0;
angles[PITCH] = 0;
angles[ROLL] = UI_MachinegunSpinAngle( pi );
if( pi->realWeapon == WP_GAUNTLET || pi->realWeapon == WP_BFG ) {
angles[PITCH] = angles[ROLL];
angles[ROLL] = 0;
}
AnglesToAxis( angles, barrel.axis );
UI_PositionRotatedEntityOnTag( &barrel, &gun, pi->weaponModel, "tag_barrel");

View file

@ -333,8 +333,8 @@ static void UI_PositionRotatedEntityOnTag( refEntity_t *entity, const refEntity_
}
// cast away const because of compiler problems
MatrixMultiply( entity->axis, ((refEntity_t *)parent)->axis, tempAxis );
MatrixMultiply( lerped.axis, tempAxis, entity->axis );
MatrixMultiply( entity->axis, lerped.axis, tempAxis );
MatrixMultiply( tempAxis, ((refEntity_t *)parent)->axis, entity->axis );
}
@ -845,10 +845,6 @@ void UI_DrawPlayer( float x, float y, float w, float h, playerInfo_t *pi, int ti
angles[YAW] = 0;
angles[PITCH] = 0;
angles[ROLL] = UI_MachinegunSpinAngle( pi );
if( pi->realWeapon == WP_GAUNTLET || pi->realWeapon == WP_BFG ) {
angles[PITCH] = angles[ROLL];
angles[ROLL] = 0;
}
AnglesToAxis( angles, barrel.axis );
UI_PositionRotatedEntityOnTag( &barrel, &gun, pi->weaponModel, "tag_barrel");