mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
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:
parent
daa570c193
commit
a3c2f77236
2 changed files with 4 additions and 12 deletions
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue