Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

checkextension

From Quake Wiki

Revision as of 21:10, 6 February 2010 by 83.226.254.64 (talk) (New page: '''Builtin:''' float(string s) checkextension = #99; '''Description:''' Check if (cvar("pr_checkextension")) before calling this, this is the only guaranteed extension to be present in ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Builtin:

float(string s) checkextension = #99;

Description:

Check if (cvar("pr_checkextension")) before calling this, this is the only guaranteed extension to be present in the extension system, it allows you to check if an extension is available, by name, to check for an extension.

Use QC code like this:

if (cvar("pr_checkextension"))
if (checkextension("DP_SV_SETCOLOR"))
	ext_setcolor = TRUE;

It is recommended this code be placed in worldspawn or a worldspawn called function somewhere, from then on you can check ext_setcolor to know if that extension is available.