r5sdk/r5dev/common/global.h
Kawe Mazidjatari 609d705a0c Tier1: static construction of ConVar objects during link time
Fully implemented ConVar class so we could statically construct all SDK convars, this avoids a level of indirection, and allows for creating ConVar's everywhere in the project.

This patch also removed the settings tab of the ImGui server browser, as it has threading issues, while it technically never caused a crash yet, it has been removed as there was no point keeping it vs the work required to make it thread save (it only managed 2 convars which are perfectly manageable through cfg's or the in-game console).

Also temporarily disabled the creation of ConVar's in the mod system due to a memory leak, we would allocate and register a convar based on details parsed out of a mod file definition, but never unregister and free it.
2024-04-05 18:13:32 +02:00

122 lines
3.6 KiB
C

#ifndef GLOBAL_H
#define GLOBAL_H
//-------------------------------------------------------------------------
// ENGINE |
extern ConVar* single_frame_shutdown_for_reload;
extern ConVar* old_gather_props;
extern ConVar* enable_debug_overlays;
extern ConVar* debug_draw_box_depth_test;
extern ConVar* developer;
extern ConVar* fps_max;
extern ConVar* fps_max_vsync;
#ifndef DEDICATED
extern ConVar* in_syncRT;
#endif // !DEDICATED
extern ConVar* base_tickinterval_sp;
extern ConVar* base_tickinterval_mp;
extern ConVar* staticProp_no_fade_scalar;
extern ConVar* staticProp_gather_size_weight;
extern ConVar* model_defaultFadeDistScale;
extern ConVar* model_defaultFadeDistMin;
extern ConVar* ip_cvar;
extern ConVar* hostname;
extern ConVar* hostip;
extern ConVar* hostport;
extern ConVar* host_hasIrreversibleShutdown;
extern ConVar* host_timescale;
extern ConVar* mp_gamemode;
#ifndef DEDICATED
extern ConVar* r_visualizetraces;
extern ConVar* r_visualizetraces_duration;
#endif // !DEDICATED
extern ConVar* stream_overlay;
extern ConVar* stream_overlay_mode;
//-------------------------------------------------------------------------
// SHARED |
extern ConVar* eula_version;
extern ConVar* eula_version_accepted;
extern ConVar* language_cvar;
//-------------------------------------------------------------------------
// SERVER |
#ifndef CLIENT_DLL
extern ConVar* ai_script_nodes_draw;
extern ConVar* sv_forceChatToTeamOnly;
extern ConVar* sv_single_core_dedi;
extern ConVar* sv_maxunlag;
extern ConVar* sv_clockcorrection_msecs;
extern ConVar* sv_updaterate_sp;
extern ConVar* sv_updaterate_mp;
extern ConVar* sv_showhitboxes;
extern ConVar* sv_stats;
extern ConVar* sv_voiceEcho;
extern ConVar* sv_voiceenable;
extern ConVar* sv_alltalk;
extern ConVar* player_userCmdsQueueWarning;
#endif // CLIENT_DLL
extern ConVar* sv_cheats;
extern ConVar* sv_visualizetraces;
extern ConVar* sv_visualizetraces_duration;
extern ConVar* bhit_enable;
//-------------------------------------------------------------------------
// CLIENT |
#ifndef DEDICATED
extern ConVar* cl_threaded_bone_setup;
extern ConVar* origin_disconnectWhenOffline;
extern ConVar* discord_updatePresence;
#endif // !DEDICATED
//-------------------------------------------------------------------------
// FILESYSTEM |
extern ConVar* fs_showAllReads;
//-------------------------------------------------------------------------
// NETCHANNEL |
extern ConVar* net_usesocketsforloopback;
extern ConVar* net_data_block_enabled;
extern ConVar* net_datablock_networkLossForSlowSpeed;
extern ConVar* net_compressDataBlock;
extern ConVar ssl_verify_peer;
extern ConVar curl_timeout;
extern ConVar curl_debug;
//-------------------------------------------------------------------------
// RUI |
#ifndef DEDICATED
extern ConVar* rui_defaultDebugFontFace;
#endif // !DEDICATED
//-------------------------------------------------------------------------
// MILES |
#ifndef DEDICATED
extern ConVar* miles_language;
#endif
void ConVar_InitShipped(void);
void ConVar_PurgeShipped(void);
void ConVar_PurgeHostNames(void);
void ConCommand_InitShipped(void);
void ConCommand_PurgeShipped(void);
#endif // GLOBAL_H