benilla-re systems structs docs

CVarLoadFile

function · cvar · orchestration

Address
0x63d820 · 239 bytes, up to 0x63d90e
Signature
void __fastcall (const char *name)
Meaning
Loads a config file by name, or under WTF, and runs each line that begins with SET
Confidence
verified, proof two
Name from
the community database (idb)
Finding
cvar/config#reading-the-file

Finding: Reading the file in cvar: config

LoadFile(name) loads the whole file by name and, when that fails, WTF\<name>; with neither it does nothing. A UTF-8 byte order mark is skipped. It splits the text at CR and LF; a line keeps its first 0x7f bytes and the rest is dropped. It runs each line that begins with SET (case-blind) through the console's executor with the history flag off. The set command keeps 0x40 bytes of the name and 0x100 of the value, and a quote inside a value ends it. Because the executor runs set, an unknown name becomes a script-hidden record (category 5) holding the file's value as its value and reset text; a later registration keeps that value (registry#registering-a-setting).

The derivation is in the doc.

Callers 3

Callees 6

Calls and jumps by a bare address, from tables/calls.tsv.