Added changes to outside code.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "game/dvars.hpp"
|
||||
|
||||
#include "console.hpp"
|
||||
#include "demo_playback.hpp"
|
||||
|
||||
#include <utils/hook.hpp>
|
||||
#include <utils/string.hpp>
|
||||
@@ -13,6 +14,12 @@ namespace dvar_cheats
|
||||
{
|
||||
void apply_sv_cheats(const game::dvar_t* dvar, const game::DvarSetSource source, game::dvar_value* value)
|
||||
{
|
||||
// return early because sv_cheats is enabled when playing back demos
|
||||
if (demo_playback::playing())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (dvar && dvar->name == "sv_cheats"s)
|
||||
{
|
||||
// if dedi, do not allow internal to change value so servers can allow cheats if they want to
|
||||
|
||||
Reference in New Issue
Block a user