From 73d22e1004003af65b2e1adba19649bb9933a42e Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Fri, 16 Jan 2004 23:24:49 +0000 Subject: * Fixed absence of weapon flash effects with no flash model * Adjusted chimera repeat rates a little --- src/cgame/cg_weapons.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/cgame') diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index cdd77d47..fbb79c08 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1116,20 +1116,20 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent flash.renderfx = parent->renderfx; flash.hModel = weapon->flashModel; - if( !flash.hModel ) - return; - - angles[ YAW ] = 0; - angles[ PITCH ] = 0; - angles[ ROLL ] = crandom( ) * 10; - AnglesToAxis( angles, flash.axis ); + if( flash.hModel ) + { + angles[ YAW ] = 0; + angles[ PITCH ] = 0; + angles[ ROLL ] = crandom( ) * 10; + AnglesToAxis( angles, flash.axis ); - if( noGunModel ) - CG_PositionRotatedEntityOnTag( &flash, parent, parent->hModel, "tag_weapon" ); - else - CG_PositionRotatedEntityOnTag( &flash, &gun, weapon->weaponModel, "tag_flash" ); - - trap_R_AddRefEntityToScene( &flash ); + if( noGunModel ) + CG_PositionRotatedEntityOnTag( &flash, parent, parent->hModel, "tag_weapon" ); + else + CG_PositionRotatedEntityOnTag( &flash, &gun, weapon->weaponModel, "tag_flash" ); + + trap_R_AddRefEntityToScene( &flash ); + } if( ps || cg.renderingThirdPerson || cent->currentState.number != cg.predictedPlayerState.clientNum ) -- cgit