X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2FMain.qc;h=ced8061ba9e2a58137580c79d715590165fa09a6;hp=924932090e219c963c96ff8a68f676c1ed148f82;hb=6feba10e1819ab46a2491f434fabe45f99c65541;hpb=38e318418d059dd1be5bdbf230ebc37181b06632 diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 924932090..ced8061ba 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -186,7 +186,10 @@ void CSQC_Shutdown(void) remove(players); db_close(binddb); db_close(tempdb); - db_save(ClientProgsDB, "client.db"); + if(cvar("cl_db_saveasdump")) + db_dump(ClientProgsDB, "client.db"); + else + db_save(ClientProgsDB, "client.db"); db_close(ClientProgsDB); cvar_clientsettemp_restore(); @@ -624,18 +627,9 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) local float bSkipKey; bSkipKey = false; - if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary)) - return true; - - if (MapVote_InputEvent(bInputType, nPrimary, nSecondary)) - return true; - - if(menu_visible) - if(menu_action(bInputType, nPrimary, nSecondary)) - return TRUE; - - if(autocvar_g_allow_uid2name == -1 && gametype == GAME_CTS || gametype == GAME_RACE && panel_fg_alpha) // don't lock keys before we actually see what's going on + if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE) && panel_fg_alpha && !scoreboard_active) // don't lock keys before we actually see what's going on { + /* string vyes_keys; float keys; vyes_keys = findkeysforcommand("vyes"); @@ -644,10 +638,12 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) float i; for (i = 0; i < keys; ++i) { + print(ftos(nPrimary), " ", argv(i), "\n"); if(nPrimary == stof(argv(i))) { + vote_active = 0; cvar_set("cl_allow_uid2name", "1"); - return true; + return TRUE; } } @@ -660,12 +656,37 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) { if(nPrimary == stof(argv(i))) { + vote_active = 0; cvar_set("cl_allow_uid2name", "0"); - return true; + return TRUE; } } + */ // If only I could grab F1-F12 in CSQC... but no + + if(nPrimary == 121) // ascii value for y + { + vote_active = 0; + cvar_set("cl_allow_uid2name", "1"); + return TRUE; + } + else if(nPrimary == 110) // ascii value for n + { + vote_active = 0; + cvar_set("cl_allow_uid2name", "0"); + return TRUE; + } } + if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary)) + return true; + + if (MapVote_InputEvent(bInputType, nPrimary, nSecondary)) + return true; + + if(menu_visible) + if(menu_action(bInputType, nPrimary, nSecondary)) + return TRUE; + return bSkipKey; } @@ -1066,12 +1087,16 @@ void Ent_Init() g_weaponswitchdelay = ReadByte() / 255.0; - g_balance_grenadelauncher_secondary_bouncefactor = ReadCoord(); - g_balance_grenadelauncher_secondary_bouncestop = ReadCoord(); + g_balance_grenadelauncher_bouncefactor = ReadCoord(); + g_balance_grenadelauncher_bouncestop = ReadCoord(); + g_balance_electro_secondary_bouncefactor = ReadCoord(); + g_balance_electro_secondary_bouncestop = ReadCoord(); nex_scope = !ReadByte(); campingrifle_scope = !ReadByte(); + serverflags = ReadByte(); + if(!postinit) PostInit(); }