Make testgun command without argument disable test gun model

This commit is contained in:
Zack Middleton committed 2018-06-24 22:22:25 -05:00
1 parent fb4b206709
commit 809a7765b2
1 file changed
+6 -1
+6 -1
View File
@@ -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;
}