expose r_refdef.view.quality to CSQC R_SetView VF_MINFPS_QUALITY
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 17 Nov 2011 13:06:21 +0000 (13:06 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 17 Nov 2011 13:06:21 +0000 (13:06 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11562 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c
csprogs.h

index f07cf85..094f550 100644 (file)
@@ -911,6 +911,9 @@ static void VM_CL_R_SetView (prvm_prog_t *prog)
                case VF_FOG_FADEDEPTH:
                        PRVM_G_FLOAT(OFS_RETURN) = r_refdef.fog_fadedepth;
                        break;
+               case VF_MINFPS_QUALITY:
+                       PRVM_G_FLOAT(OFS_RETURN) = r_refdef.view.quality;
+                       break;
                default:
                        PRVM_G_FLOAT(OFS_RETURN) = 0;
                        VM_Warning(prog, "VM_CL_R_GetView : unknown parm %i\n", c);
@@ -1061,6 +1064,9 @@ static void VM_CL_R_SetView (prvm_prog_t *prog)
        case VF_FOG_FADEDEPTH:
                r_refdef.fog_fadedepth = k;
                break;
+       case VF_MINFPS_QUALITY:
+               r_refdef.view.quality = k;
+               break;
        default:
                PRVM_G_FLOAT(OFS_RETURN) = 0;
                VM_Warning(prog, "VM_CL_R_SetView : unknown parm %i\n", c);
index 2aba12b..67fd489 100644 (file)
--- a/csprogs.h
+++ b/csprogs.h
@@ -49,8 +49,8 @@
 #define VF_FOG_END             209 //(float)
 #define VF_FOG_HEIGHT          210 //(float)
 #define VF_FOG_FADEDEPTH       211 //(float)
-
 #define VF_MAINVIEW            212 //(float)
+#define VF_MINFPS_QUALITY      213 //(float)
 
 #define RF_VIEWMODEL           1       // The entity is never drawn in mirrors. In engines with realtime lighting, it casts no shadows.
 #define RF_EXTERNALMODEL       2       // The entity is appears in mirrors but not in the normal view. It does still cast shadows in engines with realtime lighting.