Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
bool.qh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define boolean(value)

Functions

ERASEABLE float InterpretBoolean (string input)
 Get true/false value of a string with multiple different inputs.

Variables

const int false = 0
const int true = 1

Macro Definition Documentation

◆ boolean

Function Documentation

◆ InterpretBoolean()

ERASEABLE float InterpretBoolean ( string input)

Get true/false value of a string with multiple different inputs.

Definition at line 13 of file bool.qh.

14{
15 switch (strtolower(input))
16 {
17 case "yes":
18 case "true":
19 case "on":
20 return true;
21 case "no":
22 case "false":
23 case "off":
24 return false;
25 default:
26 return boolean(stof(input));
27 }
28}
#define boolean(value)
Definition bool.qh:9
string strtolower(string s)
float stof(string val,...)

References boolean, stof(), and strtolower().

Referenced by ClientCommand_autoswitch(), LocalCommand_handlevote(), and LocalCommand_hud().

Variable Documentation

◆ false

const int false = 0

Definition at line 6 of file bool.qh.

◆ true

const int true = 1

Definition at line 5 of file bool.qh.