All pastes #274435 Raw Edit

Stuff

public text v1 · immutable
·published 2006-12-10 18:48 UTC
rendered paste body
# 0x422E80 - 2.55
# 0x425760 - 2.60/2.60b
cvar_t *__cdecl nex_Cvar_Get(const char *var_name, const char *var_value, int flags) {
	if (flags & CVAR_CHEAT) {
		#ifdef NEX_VERBOSE
			nexUtils.log("Cvar_Get: Unlocking cheat cvar %s", var_name);
		#endif

		flags &= ~CVAR_CHEAT;
	}

	return orig_Cvar_Get(var_name, var_value, flags);
}

# CGAME/UI UNLOCKED CVARS: hooked syscall cmds (replace CG with UI for ui ofc ;d)
	if (command == CG_CVAR_REGISTER) {
		if (arg[3] & CVAR_CHEAT) {
			#ifdef NEX_VERBOSE
				nexUtils.log("CG: Unlocking cheat cvar: %s", arg[1]);
			#endif

			arg[3] &= ~CVAR_CHEAT;
		}
	}