X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fmain.qc;h=39201fd72e6a90501281cd6f46e5041e9b1c41f5;hb=9a04df193299873a8133651e4579dbfc2253b717;hp=c0d56c7981326507803b618014c733c557adde09;hpb=791f300d2660d6b75a51c6e7f302d6fa6b64861a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index c0d56c798..39201fd72 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -11,6 +11,7 @@ #include "commands/cl_cmd.qh" #include "mapvoting.qh" #include +#include "hud/panel/centerprint.qh" #include "hud/panel/scoreboard.qh" #include "hud/panel/quickmenu.qh" #include "shownames.qh" @@ -136,10 +137,17 @@ void CSQC_Init() registercvar("cl_shootfromfixedorigin", ""); - registercvar("cl_multijump", "1"); + registercvar("cl_multijump", "-1"); + + registercvar("cl_dodging", "0"); registercvar("cl_spawn_near_teammate", "1"); + registercvar("cl_weapon_switch_reload", "1"); + registercvar("cl_weapon_switch_fallback_to_impulse", "1"); + + registercvar("cl_allow_uidranking", "1"); + if(autocvar_cl_lockview) cvar_set("cl_lockview", "0"); @@ -223,15 +231,19 @@ void Shutdown() localcmd("\ncl_hook_shutdown\n"); + localcmd("\n-button12\n"); + deactivate_minigame(); HUD_MinigameMenu_Close(NULL, NULL, NULL); + + ReplicateVars(true); // destroy } .float has_team; bool SetTeam(entity o, int Team) { TC(int, Team); - devassert_once(Team); + //devassert_once(Team); entity tm; if(teamplay) { @@ -303,7 +315,7 @@ bool SetTeam(entity o, int Team) void Playerchecker_Think(entity this) { - int i; + int i; entity e; for(i = 0; i < maxclients; ++i) { @@ -796,7 +808,7 @@ NET_HANDLE(ENT_CLIENT_SPAWNEVENT, bool is_new) // The only parameter reflects if the entity is "new" to the client, meaning it just came into the client's PVS. void CSQC_Ent_Update(entity this, bool isnew) { - this.sourceLoc = __FILE__ ":" STR(__LINE__); + this.sourceLoc = __FILE__":"STR(__LINE__); int t = ReadByte(); // set up the "time" global for received entities to be correct for interpolation purposes @@ -909,11 +921,11 @@ void CSQC_Parse_Print(string strMessage) print(ColorTranslateRGB(strMessage)); } -// CSQC_Parse_CenterPrint : Provides the centerprint_hud string in the first parameter that the server provided. +// CSQC_Parse_CenterPrint : Provides the centerprint_AddStandard string in the first parameter that the server provided. void CSQC_Parse_CenterPrint(string strMessage) { if (autocvar_developer_csqcentities) LOG_INFOF("CSQC_Parse_CenterPrint(\"%s\")", strMessage); - centerprint_hud(strMessage); + centerprint_AddStandard(strMessage); } // CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer. @@ -1116,17 +1128,15 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew) break; case RACE_NET_PENALTY_RACE: - race_penaltyeventtime = time; - race_penaltytime = ReadShort(); - //race_penaltyaccumulator += race_penaltytime; - strcpy(race_penaltyreason, ReadString()); - break; - case RACE_NET_PENALTY_QUALIFYING: race_penaltyeventtime = time; race_penaltytime = ReadShort(); - race_penaltyaccumulator += race_penaltytime; - strcpy(race_penaltyreason, ReadString()); + string reason = ReadString(); + if (reason == "missing a checkpoint") + reason = _("missing a checkpoint"); + strcpy(race_penaltyreason, reason); + if (b == RACE_NET_PENALTY_QUALIFYING) + race_penaltyaccumulator += race_penaltytime; break; case RACE_NET_SERVER_RECORD: @@ -1147,12 +1157,12 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew) break; case RACE_NET_SERVER_RANKINGS: float prevpos, del; - int pos = ReadShort(); + int pos = ReadShort(); prevpos = ReadShort(); del = ReadShort(); // move other rankings out of the way - int i; + int i; if (prevpos) { int m = min(prevpos, RANKINGS_DISPLAY_CNT); for (i=m-1; i>pos-1; --i) { @@ -1219,7 +1229,7 @@ NET_HANDLE(TE_CSQC_PINGPLREPORT, bool isNew) NET_HANDLE(TE_CSQC_WEAPONCOMPLAIN, bool isNew) { int weapon_id = ReadByte(); - complain_weapon = Weapons_from(weapon_id); + complain_weapon = REGISTRY_GET(Weapons, weapon_id); complain_weapon_type = ReadByte(); return = true; @@ -1256,6 +1266,8 @@ string _getcommandkey(string cmd_name, string command, bool forcename) if(!joy_active && substring(key, 0, 3) == "JOY") continue; + key = translate_key(key); + if (keys == "") keys = key; else