Fix weapon barrel angle on Gauntlet and BFG items in Team Arena

The barrels were rotated 90 degrees from what they should be.
Used barrel code from CG_AddPlayerWeapon to fix them.
This commit is contained in:
Zack Middleton 2014-12-10 18:50:22 -06:00
parent 424122c366
commit b0561e5fb4

View file

@ -352,6 +352,7 @@ static void CG_Item( centity_t *cent ) {
#ifdef MISSIONPACK #ifdef MISSIONPACK
if ( item->giType == IT_WEAPON && wi && wi->barrelModel ) { if ( item->giType == IT_WEAPON && wi && wi->barrelModel ) {
refEntity_t barrel; refEntity_t barrel;
vec3_t angles;
memset( &barrel, 0, sizeof( barrel ) ); memset( &barrel, 0, sizeof( barrel ) );
@ -361,9 +362,13 @@ static void CG_Item( centity_t *cent ) {
barrel.shadowPlane = ent.shadowPlane; barrel.shadowPlane = ent.shadowPlane;
barrel.renderfx = ent.renderfx; barrel.renderfx = ent.renderfx;
angles[YAW] = 0;
angles[PITCH] = 0;
angles[ROLL] = 0;
AnglesToAxis( angles, barrel.axis );
CG_PositionRotatedEntityOnTag( &barrel, &ent, wi->weaponModel, "tag_barrel" ); CG_PositionRotatedEntityOnTag( &barrel, &ent, wi->weaponModel, "tag_barrel" );
AxisCopy( ent.axis, barrel.axis );
barrel.nonNormalizedAxes = ent.nonNormalizedAxes; barrel.nonNormalizedAxes = ent.nonNormalizedAxes;
trap_R_AddRefEntityToScene( &barrel ); trap_R_AddRefEntityToScene( &barrel );