X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fclient%2FMain.qc;h=ced8061ba9e2a58137580c79d715590165fa09a6;hb=520a3a3b0dd71ab7e3e9c47a9cf9631e72ed0d8f;hp=780609d5a9e507bc2ea8899ba4b0f2e9152ba0e1;hpb=9334cf53b0bdefd6710e84a4ba2f5e4fb97818c9;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 780609d5a..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(); @@ -440,7 +443,9 @@ void ShotOrg_Draw() self.angles = view_angles; self.angles_x = -self.angles_x; if not(self.cnt) - R_AddEntity(self); + self.drawmask = MASK_NORMAL; + else + self.drawmask = 0; } void ShotOrg_Draw2D() { @@ -487,11 +492,12 @@ void DrawDebugModel() if(time - floor(time) > 0.5) { PolyDrawModel(self); + self.drawmask = 0; } else { self.renderflags = 0; - R_AddEntity(self); + self.drawmask = MASK_NORMAL; } } @@ -621,6 +627,56 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) local float bSkipKey; bSkipKey = false; + 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"); + keys = tokenize(vyes_keys); + + 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; + } + } + + string vno_keys; + vno_keys = findkeysforcommand("vno"); + keys = tokenize(vno_keys); + + float i; + for (i = 0; i < keys; ++i) + { + if(nPrimary == stof(argv(i))) + { + vote_active = 0; + cvar_set("cl_allow_uid2name", "0"); + 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; @@ -630,6 +686,7 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) if(menu_visible) if(menu_action(bInputType, nPrimary, nSecondary)) return TRUE; + return bSkipKey; } @@ -1030,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(); } @@ -1334,15 +1395,6 @@ float CSQC_Parse_TempEntity() Net_WeaponComplain(); bHandled = true; break; - case TE_CSQC_NEX_VELOCITY: - nex_velocitydependent = ReadByte(); - nex_minvelocity = ReadShort(); - nex_maxvelocity = ReadShort(); - nex_speed_falloff_rate = ReadByte(); - nex_charge = ReadByte(); - nex_charge_rate = ReadByte(); - bHandled = true; - break; case TE_CSQC_CR_MAXBULLETS: cr_maxbullets = ReadByte(); bHandled = true;