summaryrefslogtreecommitdiff
path: root/src/cgame/cg_weapons.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame/cg_weapons.c')
-rw-r--r--src/cgame/cg_weapons.c26
1 files changed, 13 insertions, 13 deletions
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 )