diff --git a/code/cgame/cg_view.c b/code/cgame/cg_view.c index 5f53cd5a..3dba5eba 100644 --- a/code/cgame/cg_view.c +++ b/code/cgame/cg_view.c @@ -71,6 +71,7 @@ can then be moved around void CG_TestModel_f (void) { vec3_t angles; + cg.testGun = qfalse; memset( &cg.testModelEntity, 0, sizeof(cg.testModelEntity) ); if ( trap_Argc() < 2 ) { return; @@ -96,7 +97,6 @@ void CG_TestModel_f (void) { angles[ROLL] = 0; AnglesToAxis( angles, cg.testModelEntity.axis ); - cg.testGun = qfalse; } /* @@ -108,6 +108,11 @@ Replaces the current view weapon with the given model */ void CG_TestGun_f (void) { CG_TestModel_f(); + + if ( !cg.testModelEntity.hModel ) { + return; + } + cg.testGun = qtrue; cg.testModelEntity.renderfx = RF_MINLIGHT | RF_DEPTHHACK | RF_FIRST_PERSON; }