Use g_hitEffect CVar variable directly instead of getting it by name

No need to do a lookup of the CVar by name every time the player is hit,
we can just access the variable holding it.
This commit is contained in:
Daniel Gibson 2020-05-30 05:41:22 +02:00
parent 75e9af81e1
commit e24b62d3e0
2 changed files with 2 additions and 2 deletions

View file

@ -255,7 +255,7 @@ which will determine the head kick direction
==============
*/
void idPlayerView::DamageImpulse( idVec3 localKickDir, const idDict *damageDef ) {
if ( cvarSystem->GetCVarBool( "g_hitEffect" ) ) {
if ( g_hitEffect.GetBool() ) {
//
// double vision effect
//

View file

@ -224,7 +224,7 @@ which will determine the head kick direction
==============
*/
void idPlayerView::DamageImpulse( idVec3 localKickDir, const idDict *damageDef ) {
if ( cvarSystem->GetCVarBool( "g_hitEffect" ) ) {
if ( g_hitEffect.GetBool() ) {
//
// double vision effect
//