| 969 | extern float CG_ForceSpeedFOV( void ); |
| 970 | |
| 971 | void CG_AddViewWeapon( playerState_t *ps ) |
| 972 | { |
| 973 | refEntity_t hand; |
| 974 | refEntity_t flash; |
| 975 | vec3_t angles; |
| 976 | const weaponInfo_t *weapon; |
| 977 | weaponData_t *wData; |
| 978 | centity_t *cent; |
| 979 | float fovOffset, leanOffset; |
| 980 | |
| 981 | // no gun if in third person view |
| 982 | if ( cg.renderingThirdPerson ) |
| 983 | return; |
| 984 | |
| 985 | if ( ps->pm_type == PM_INTERMISSION ) |
| 986 | return; |
| 987 | |
| 988 | cent = &cg_entities[ps->clientNum]; |
| 989 | |
| 990 | if ( ps->eFlags & EF_LOCKED_TO_WEAPON ) |
| 991 | { |
| 992 | return; |
| 993 | } |
| 994 | |
| 995 | if ( cent->gent && cent->gent->client && cent->gent->client->ps.forcePowersActive&(1<<FP_LIGHTNING) ) |
| 996 | {//doing the electrocuting |
| 997 | vec3_t temp;//tAng, fxDir, |
| 998 | //VectorSet( tAng, cent->pe.torso.pitchAngle, cent->pe.torso.yawAngle, 0 ); |
| 999 | |
| 1000 | VectorCopy( cent->gent->client->renderInfo.handLPoint, temp ); |
| 1001 | VectorMA( temp, -5, cg.refdef.viewaxis[0], temp ); |
| 1002 | if ( cent->gent->client->ps.forcePowerLevel[FP_LIGHTNING] > FORCE_LEVEL_2 ) |
| 1003 | {//arc |
| 1004 | //vec3_t fxAxis[3]; |
| 1005 | //AnglesToAxis( tAng, fxAxis ); |
| 1006 | theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, temp, cg.refdef.viewaxis ); |
| 1007 | } |
| 1008 | else |
| 1009 | {//line |
| 1010 | //AngleVectors( tAng, fxDir, NULL, NULL ); |
| 1011 | theFxScheduler.PlayEffect( cgs.effects.forceLightning, temp, cg.refdef.viewaxis[0] ); |
| 1012 | } |
| 1013 | } |
| 1014 | |
| 1015 | if ( cent->gent && cent->gent->client && cent->gent->client->ps.forcePowersActive&(1<<FP_DRAIN) ) |
| 1016 | {//doing the draining |
| 1017 | vec3_t temp;//tAng, fxDir, |
| 1018 | //VectorSet( tAng, cent->pe.torso.pitchAngle, cent->pe.torso.yawAngle, 0 ); |
| 1019 | |
| 1020 | VectorCopy( cent->gent->client->renderInfo.handLPoint, temp ); |
| 1021 | VectorMA( temp, -5, cg.refdef.viewaxis[0], temp ); |
| 1022 | if ( cent->gent->client->ps.forcePowerLevel[FP_DRAIN] > FORCE_LEVEL_2 ) |
| 1023 | {//arc |
| 1024 | //vec3_t fxAxis[3]; |
| 1025 | //AnglesToAxis( tAng, fxAxis ); |
| 1026 | theFxScheduler.PlayEffect( cgs.effects.forceDrainWide, temp, cg.refdef.viewaxis ); |
| 1027 | } |
| 1028 | else |
no test coverage detected