fs = ((prog->argc <= 1) || ((int)PRVM_G_FLOAT(OFS_PARM1)));
- if(nr < 0 || nr >= (fs ? video_resolutions_count : video_resolutions_hardcoded_count))
+ if(nr < -1 || nr >= (fs ? video_resolutions_count : video_resolutions_hardcoded_count))
{
PRVM_G_VECTOR(OFS_RETURN)[0] = 0;
PRVM_G_VECTOR(OFS_RETURN)[1] = 0;
PRVM_G_VECTOR(OFS_RETURN)[2] = 0;
}
+ else if(nr == -1)
+ {
+ vid_mode_t *m = VID_GetDesktopMode();
+ if (m)
+ {
+ PRVM_G_VECTOR(OFS_RETURN)[0] = m->width;
+ PRVM_G_VECTOR(OFS_RETURN)[1] = m->height;
+ PRVM_G_VECTOR(OFS_RETURN)[2] = m->pixelheight_num / (prvm_vec_t) m->pixelheight_denom;
+ }
+ else
+ {
+ PRVM_G_VECTOR(OFS_RETURN)[0] = 0;
+ PRVM_G_VECTOR(OFS_RETURN)[1] = 0;
+ PRVM_G_VECTOR(OFS_RETURN)[2] = 0;
+ }
+ }
else
{
video_resolution_t *r = &((fs ? video_resolutions : video_resolutions_hardcoded)[nr]);
VM_gecko_get_texture_extent, // #493 vector gecko_get_texture_extent( string name )
VM_crc16, // #494 float(float caseinsensitive, string s, ...) crc16 = #494 (DP_QC_CRC16)
VM_cvar_type, // #495 float(string name) cvar_type = #495; (DP_QC_CVAR_TYPE)
-NULL, // #496
-NULL, // #497
-NULL, // #498
-NULL, // #499
-NULL, // #500
+VM_numentityfields, // #496 float() numentityfields = #496; (QP_QC_ENTITYDATA)
+VM_entityfieldname, // #497 string(float fieldnum) entityfieldname = #497; (DP_QC_ENTITYDATA)
+VM_entityfieldtype, // #498 float(float fieldnum) entityfieldtype = #498; (DP_QC_ENTITYDATA)
+VM_getentityfieldstring, // #499 string(float fieldnum, entity ent) getentityfieldstring = #499; (DP_QC_ENTITYDATA)
+VM_putentityfieldstring, // #500 float(float fieldnum, entity ent, string s) putentityfieldstring = #500; (DP_QC_ENTITYDATA)
NULL, // #501
NULL, // #502
VM_whichpack, // #503 string(string) whichpack = #503;