Skip to content

Commit

Permalink
Make halo effect scale up as well, change the colour to green to matc…
Browse files Browse the repository at this point in the history
…h the xhair
  • Loading branch information
AfterShockFF committed Jun 5, 2016
1 parent 88a4289 commit 3dec264
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions game_shared/ff/ff_weapon_jumpgun.cpp
Expand Up @@ -55,13 +55,13 @@
//ConVar ffdev_jumpgun_fx_amplitude("ffdev_jumpgun_fx_amplitude", "10", FCVAR_REPLICATED /* | FCVAR_CHEAT */);
#define JUMPGUN_EFFECT_AMPLITUDE 10 //ffdev_jumpgun_fx_amplitude.GetFloat()

//ConVar ffdev_jumpgun_fx_r("ffdev_jumpgun_fx_r", "255", FCVAR_REPLICATED /* | FCVAR_CHEAT */);
#define JUMPGUN_EFFECT_R 255 //ffdev_jumpgun_fx_r.GetInt()

//ConVar ffdev_jumpgun_fx_g("ffdev_jumpgun_fx_g", "255", FCVAR_REPLICATED /* | FCVAR_CHEAT */);
#define JUMPGUN_EFFECT_G 255 //ffdev_jumpgun_fx_g.GetInt()

//ConVar ffdev_jumpgun_fx_b("ffdev_jumpgun_fx_b", "255", FCVAR_REPLICATED /* | FCVAR_CHEAT */);
//ConVar ffdev_jumpgun_fx_r("ffdev_jumpgun_fx_r", "255", FCVAR_REPLICATED /* | FCVAR_CHEAT */);
#define JUMPGUN_EFFECT_R 255 //ffdev_jumpgun_fx_r.GetInt()

//ConVar ffdev_jumpgun_fx_g("ffdev_jumpgun_fx_g", "255", FCVAR_REPLICATED /* | FCVAR_CHEAT */);
#define JUMPGUN_EFFECT_G 255 //ffdev_jumpgun_fx_g.GetInt()

//ConVar ffdev_jumpgun_fx_b("ffdev_jumpgun_fx_b", "255", FCVAR_REPLICATED /* | FCVAR_CHEAT */);
#define JUMPGUN_EFFECT_B 255 //ffdev_jumpgun_fx_b.GetInt()

//ConVar ffdev_jumpgun_fx_alpha("ffdev_jumpgun_fx_alpha", "100", FCVAR_REPLICATED /* | FCVAR_CHEAT */);
Expand Down Expand Up @@ -548,14 +548,17 @@ void CFFWeaponJumpgun::ViewModelDrawn( C_BaseViewModel *pBaseViewModel )

float effectScale = flPercent == 1.0f ? 5.0f : 2.0f;

DrawBeamQuadratic(vecStart, vecControl, vecEnd, effectScale * flPercent, Vector(0.91f, 0.17f, 0.05f), flScrollOffset);
float JUMPGUN_BARRELCOLOR_R = 0.4f;
float JUMPGUN_BARRELCOLOR_G = 0.8f;
float JUMPGUN_BARRELCOLOR_B = 0.1f;
DrawBeamQuadratic(vecStart, vecControl, vecEnd, effectScale * flPercent, Vector(JUMPGUN_BARRELCOLOR_R, JUMPGUN_BARRELCOLOR_G, JUMPGUN_BARRELCOLOR_B), flScrollOffset);

float colour[3] = { 0.91f, 0.17f, 0.05f };
float colour[3] = { JUMPGUN_BARRELCOLOR_R, JUMPGUN_BARRELCOLOR_G, JUMPGUN_BARRELCOLOR_B };

pMat = materials->FindMaterial("effects/stunstick", TEXTURE_GROUP_CLIENT_EFFECTS);
materials->Bind(pMat);

DrawHalo(pMat, vecMuzzle, 1.9f * flPercent, colour);
DrawHalo(pMat, vecMuzzle, 0.58f * effectScale, colour);
}

//----------------------------------------------------------------------------
Expand Down

0 comments on commit 3dec264

Please sign in to comment.