From 9b8ca0455aa24dc0979151b60bd26dd162959ca5 Mon Sep 17 00:00:00 2001 From: div0 Date: Sat, 19 Dec 2009 16:46:47 +0000 Subject: [PATCH] -cvar_check git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8422 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/balance.cfg | 7 ------- data/balance25.cfg | 7 ------- data/balanceHavoc.cfg | 7 ------- data/balanceNexrun.cfg | 7 ------- data/balanceSamual.cfg | 7 ------- data/defaultNexuiz.cfg | 3 --- data/qcsrc/server/constants.qh | 3 --- data/qcsrc/server/g_world.qc | 9 --------- data/update-cvarcount.sh | 23 ----------------------- 9 files changed, 73 deletions(-) diff --git a/data/balance.cfg b/data/balance.cfg index 787499aa6..0c018df29 100644 --- a/data/balance.cfg +++ b/data/balance.cfg @@ -1,10 +1,3 @@ -// NOTE: whenever you add a cvar to this file, run update-cvarcount.sh to -// update this checksum! -// -// And... don't forget to edit the other balance*.cfg too. - -set cvar_check_balance 78dd1eac1223c09227ae89b307fb4654 - // {{{ weapon replacement // NOTE: this only replaces weapons on the map // use g_start_weapon_* to also replace the on-startup weapons! diff --git a/data/balance25.cfg b/data/balance25.cfg index 5d7dc9fc3..c7b9a08e2 100644 --- a/data/balance25.cfg +++ b/data/balance25.cfg @@ -1,10 +1,3 @@ -// NOTE: whenever you add a cvar to this file, run update-cvarcount.sh to -// update this checksum! -// -// And... don't forget to edit the other balance*.cfg too. - -set cvar_check_balance 78dd1eac1223c09227ae89b307fb4654 - // {{{ weapon replacement // NOTE: this only replaces weapons on the map // use g_start_weapon_* to also replace the on-startup weapons! diff --git a/data/balanceHavoc.cfg b/data/balanceHavoc.cfg index 433638911..c3425b4f6 100644 --- a/data/balanceHavoc.cfg +++ b/data/balanceHavoc.cfg @@ -1,10 +1,3 @@ -// NOTE: whenever you add a cvar to this file, run update-cvarcount.sh to -// update this checksum! -// -// And... don't forget to edit the other balance*.cfg too. - -set cvar_check_balance 78dd1eac1223c09227ae89b307fb4654 - // {{{ weapon replacement // NOTE: this only replaces weapons on the map // use g_start_weapon_* to also replace the on-startup weapons! diff --git a/data/balanceNexrun.cfg b/data/balanceNexrun.cfg index 801114715..57002f265 100644 --- a/data/balanceNexrun.cfg +++ b/data/balanceNexrun.cfg @@ -1,10 +1,3 @@ -// NOTE: whenever you add a cvar to this file, run update-cvarcount.sh to -// update this checksum! -// -// And... don't forget to edit the other balance*.cfg too. - -set cvar_check_balance 78dd1eac1223c09227ae89b307fb4654 - // {{{ weapon replacement // NOTE: this only replaces weapons on the map // use g_start_weapon_* to also replace the on-startup weapons! diff --git a/data/balanceSamual.cfg b/data/balanceSamual.cfg index 787499aa6..0c018df29 100644 --- a/data/balanceSamual.cfg +++ b/data/balanceSamual.cfg @@ -1,10 +1,3 @@ -// NOTE: whenever you add a cvar to this file, run update-cvarcount.sh to -// update this checksum! -// -// And... don't forget to edit the other balance*.cfg too. - -set cvar_check_balance 78dd1eac1223c09227ae89b307fb4654 - // {{{ weapon replacement // NOTE: this only replaces weapons on the map // use g_start_weapon_* to also replace the on-startup weapons! diff --git a/data/defaultNexuiz.cfg b/data/defaultNexuiz.cfg index 342e16064..f5d3ce5c3 100644 --- a/data/defaultNexuiz.cfg +++ b/data/defaultNexuiz.cfg @@ -25,9 +25,6 @@ if_dedicated alias if_client "" seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1 Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg" -// default.cfg versioning (update using update-cvarcount.sh, run that every time after adding a new cvar) -set cvar_check_default eff74125dcce791892223923df9dbf93 - // Nexuiz version (formatted for machines) // used to determine if a client version is compatible // this doesn't have to be bumped with every release diff --git a/data/qcsrc/server/constants.qh b/data/qcsrc/server/constants.qh index 5ec0b67d4..dca76fe00 100644 --- a/data/qcsrc/server/constants.qh +++ b/data/qcsrc/server/constants.qh @@ -1,6 +1,3 @@ -string CVAR_CHECK_DEFAULT = "eff74125dcce791892223923df9dbf93"; -string CVAR_CHECK_BALANCE = "78dd1eac1223c09227ae89b307fb4654"; - float FALSE = 0; float TRUE = 1; diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index 9deeb3a71..466c7b693 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -397,15 +397,6 @@ void spawnfunc_worldspawn (void) check_unacceptable_compiler_bugs(); - if(cvar_string("cvar_check_default") != "bypass") - { - if(cvar_string("cvar_check_default") != CVAR_CHECK_DEFAULT) - error("Config file mismatch! Please update defaultNexuiz.cfg to match the QuakeC code, and restart the engine!"); - - if(cvar_string("cvar_check_balance") != CVAR_CHECK_BALANCE) - error("Config file mismatch! Please update balance*.cfg to match the QuakeC code, and restart the engine!"); - } - compressShortVector_init(); local entity head; diff --git a/data/update-cvarcount.sh b/data/update-cvarcount.sh index 48c3aaf1e..55727d9e0 100755 --- a/data/update-cvarcount.sh +++ b/data/update-cvarcount.sh @@ -2,7 +2,6 @@ balance_cfgs="balanceHavoc.cfg balance25.cfg balanceSamual.cfg balanceNexrun.cfg" -countd=`awk '/^seta? g_/ { print $2; }' defaultNexuiz.cfg | sort -u | tr -d '\r' | md5sum | cut -c 1-32` countw=`awk '/^seta? g_/ { print $2; }' balance.cfg | sort -u | tr -d '\r' | md5sum | cut -c 1-32` for b in $balance_cfgs; do countb=`awk '/^seta? g_/ { print $2; }' "$b" | sort -u | tr -d '\r' | md5sum | cut -c 1-32` @@ -11,25 +10,3 @@ for b in $balance_cfgs; do exit 1 fi done - -sed -i -e "s/^set cvar_check_default .*/set cvar_check_default $countd/" defaultNexuiz.cfg -sed -i -e "s/^set cvar_check_balance .*/set cvar_check_balance $countw/" balance.cfg -for b in $balance_cfgs; do - sed -i -e "s/^set cvar_check_balance .*/set cvar_check_balance $countw/" "$b" -done - -sed -e " - s/^string CVAR_CHECK_DEFAULT = .*/string CVAR_CHECK_DEFAULT = \"$countd\";/; - s/^string CVAR_CHECK_BALANCE = .*/string CVAR_CHECK_BALANCE = \"$countw\";/; -" qcsrc/server/constants.qh > qcsrc/server/constants.qh.new - -if ! diff qcsrc/server/constants.qh qcsrc/server/constants.qh.new; then - mv qcsrc/server/constants.qh.new qcsrc/server/constants.qh - if [ -z "$DO_NOT_RUN_MAKE" ]; then - make - else - echo "New checksums: $countd, $countw; please recompile!" - fi -else - rm -f qcsrc/server/constants.qh.new -fi -- 2.39.2