Permalink
Browse files

Always reset Cvar::CHEAT cvars to default value.

  • Loading branch information...
DolceTriade committed Dec 24, 2015
1 parent 6808154 commit 0146ad68174bf231ff4261c76a53638dadad49bd
Showing with 4 additions and 1 deletion.
  1. +4 −1 daemon/src/engine/framework/CvarSystem.cpp
@@ -302,10 +302,13 @@ namespace Cvar {
Log::Notice("Cvar %s cannot be registered twice\n", name.c_str());
}

//Register the cvar with the previous user_created value
// Register the cvar with the previous user_created value
cvar->flags &= ~CVAR_USER_CREATED;
cvar->flags |= flags;
cvar->proxy = proxy;
if (flags & CHEAT) {
cvar->value = defaultValue;
}

cvar->resetValue = defaultValue;
cvar->description = "";

0 comments on commit 0146ad6

Please sign in to comment.