set cl_accuracy_data_share 0 "1 share my weapon accuracy data statistics with other players, 0 keep my weapon accuracy data statistics hidden"
set cl_accuracy_data_receive 0 "1 receive weapon accuracy data statistics at the end of the match"
-set developer_fteqccbugs 0 "check fteqcc bugs on startup"
-set _allow_unacceptable_compiler_bugs 0 "don't bail out if certain bugs are detected (HANDLE WITH CARE)"
set spawn_debug 0 "use all spawns one by one, then abort, to verify all spawnpoints"
set loddebug 0 "force this LOD level"
set spawn_debugview 0 "display spawnpoints and their rating on spawn to debug spawnpoint rating calculation"
{
}
-#ifdef USE_FTE
-float __engine_check;
-#endif
-
string forcefog;
void WaypointSprite_Load();
void ConsoleCommand_macro_init();
void CSQC_Init(void)
{
prvm_language = cvar_string("prvm_language");
-#ifdef USE_FTE
-#pragma target ID
- __engine_check = checkextension("DP_SV_WRITEPICTURE");
- if(!__engine_check)
- {
- print(_("^3Your engine build is outdated\n^3This Server uses a newer QC VM. Please update!\n"));
- localcmd("\ndisconnect\n");
- return;
- }
-#pragma target FTE
-#endif
-
- check_unacceptable_compiler_bugs();
#ifdef WATERMARK
dprintf("^4CSQC Build information: ^1%s\n", WATERMARK);
// CSQC_Shutdown : Called every time the CSQC code is shutdown (changing maps, quitting, etc)
void Shutdown(void)
{
-#ifdef USE_FTE
-#pragma TARGET id
- if(!__engine_check)
- return 0;
-#pragma TARGET fte
-#endif
-
WarpZone_Shutdown();
remove(teams);
-#ifdef USE_FTE
-#pragma target FTE
-#endif
-
#define CSQC
#define ATTEN_NORM builtin_ATTEN_NORM
return myvel + spd * mydir;
}
-void check_unacceptable_compiler_bugs()
-{
- if(cvar("_allow_unacceptable_compiler_bugs"))
- return;
- tokenize_console("foo bar");
- if(strcat(argv(0), substring("foo bar", 4, 7 - argv_start_index(1))) == "barbar")
- error("fteqcc bug introduced with revision 3178 detected. Please upgrade fteqcc to a later revision, downgrade fteqcc to revision 3177, or pester Spike until he fixes it. You can set _allow_unacceptable_compiler_bugs 1 to skip this check, but expect stuff to be horribly broken then.");
-
- string s = "";
- if (!s)
- error("The empty string counts as false. We do not want that!");
-}
-
float compressShotOrigin(vector v)
{
float x, y, z;
vector solve_shotdirection(vector myorg, vector myvel, vector eorg, vector evel, float spd, float newton_style);
vector get_shotvelocity(vector myvel, vector mydir, float spd, float newton_style, float mi, float ma);
-void check_unacceptable_compiler_bugs();
-
float compressShotOrigin(vector v);
vector decompressShotOrigin(float f);
prvm_language = strzone(prvm_language);
cvar_set("_menu_prvm_language", prvm_language);
- check_unacceptable_compiler_bugs();
-
#ifdef WATERMARK
dprintf("^4MQC Build information: ^1%s\n", WATERMARK);
#endif
float autocvar_captureleadlimit_override;
#define autocvar_capturelimit_override cvar("capturelimit_override")
#define autocvar_developer cvar("developer")
-float autocvar_developer_fteqccbugs;
float autocvar_ekg;
#define autocvar_fraglimit cvar("fraglimit")
#define autocvar_fraglimit_override cvar("fraglimit_override")
}
}
-void fteqcc_testbugs()
-{
- float a, b;
-
- if(!autocvar_developer_fteqccbugs)
- return;
-
- dprint("*** fteqcc test: checking for bugs...\n");
-
- a = 1;
- b = 5;
- if(sqrt(a) - sqrt(b - a) == 0)
- dprint("*** fteqcc test: found same-function-twice bug\n");
- else
- dprint("*** fteqcc test: same-function-twice bug got FINALLY FIXED! HOORAY!\n");
-
- world.cnt = -10;
- world.enemy = world;
- world.enemy.cnt += 10;
- if(world.cnt > 0.2 || world.cnt < -0.2) // don't error out if it's just roundoff errors
- dprint("*** fteqcc test: found += bug\n");
- else
- dprint("*** fteqcc test: += bug got FINALLY FIXED! HOORAY!\n");
- world.cnt = 0;
-}
-
void GotoFirstMap()
{
float n;
remove = remove_safely; // during spawning, watch what you remove!
- check_unacceptable_compiler_bugs();
-
cvar_changes_init(); // do this very early now so it REALLY matches the server config
compressShortVector_init();
if(autocvar_g_campaign)
CampaignPostInit();
- fteqcc_testbugs();
-
Ban_LoadBans();
MapInfo_Enumerate();