X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2FMain.qc;h=9bc8c3cd59e6898096781f8b4817929f69db1bed;hb=707b95ea2f5399ce787bc7a1087d211bd851d4ff;hp=4eac3af0952a4c2fc580fc4abe6c5659445ab856;hpb=3b4538464212cdef7e377e6e203e820178a76fe6;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 4eac3af09..9bc8c3cd5 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -120,7 +120,7 @@ void CSQC_Init(void) draw_endBoldFont(); menu_visible = FALSE; menu_show = menu_show_error; - menu_action = menu_sub_null; + menu_action = func_null; for(i = 0; i < 255; ++i) if(getplayerkeyvalue(i, "viewentity") == "") @@ -181,6 +181,7 @@ void CSQC_Init(void) turrets_precache(); Announcer_Precache(); Tuba_Precache(); + CSQCPlayer_Precache(); if(autocvar_cl_reticle) { @@ -208,6 +209,7 @@ void CSQC_Init(void) WarpZone_Init(); + hud_skin_path = strzone(strcat("gfx/hud/", autocvar_hud_skin)); hud_configure_prev = -1; tab_panel = -1; @@ -400,7 +402,7 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) if (MapVote_InputEvent(bInputType, nPrimary, nSecondary)) return true; - if(menu_visible) + if(menu_visible && menu_action) if(menu_action(bInputType, nPrimary, nSecondary)) return TRUE; @@ -431,6 +433,7 @@ void Ent_ReadEntCS() self.origin_x = ReadShort(); self.origin_y = ReadShort(); self.origin_z = ReadShort(); + setorigin(self, self.origin); } if(sf & 4) { @@ -777,7 +780,8 @@ void CSQC_Ent_Update(float bIsNewEntity) case ENT_CLIENT_TURRET: ent_turret(); break; case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break; case ENT_CLIENT_ITEM: ItemRead(bIsNewEntity); break; - case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break; + case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break; + case ENT_CLIENT_NOTIFICATION: Read_Notification(bIsNewEntity); break; default: //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype)); error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname)); @@ -794,6 +798,18 @@ void Ent_Remove() if(self.entremove) self.entremove(); + if(self.skeletonindex) + { + skel_delete(self.skeletonindex); + self.skeletonindex = 0; + } + + if(self.snd_looping > 0) + { + sound(self, self.snd_looping, "misc/null.wav", VOL_BASE, autocvar_g_jetpack_attenuation); + self.snd_looping = 0; + } + self.enttype = 0; self.classname = ""; self.draw = menu_sub_null; @@ -1088,7 +1104,7 @@ void Net_ReadRace() void Net_ReadSpawn() { zoomin_effect = 1; - current_viewzoom = 0.6; + current_viewzoom = (1 / bound(1, autocvar_cl_spawnzoom_factor, 16)); } void Net_TeamNagger() @@ -1184,10 +1200,6 @@ float CSQC_Parse_TempEntity() HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte()); bHandled = true; break; - case TE_CSQC_KILLCENTERPRINT: - HUD_KillCenterprint(ReadString(), ReadString(), ReadShort(), ReadByte()); - bHandled = true; - break; case TE_CSQC_CENTERPRINT_GENERIC: float id; string s; @@ -1211,10 +1223,6 @@ float CSQC_Parse_TempEntity() cl_notice_read(); bHandled = true; break; - case TE_CSQC_NOTIFICATION: - Read_Notification(); - bHandled = true; - break; default: // No special logic for this temporary entity; return 0 so the engine can handle it bHandled = false; @@ -1233,7 +1241,7 @@ string getcommandkey(string text, string command) return text; keys = db_get(binddb, command); - if (!keys) + if (keys == "") { n = tokenize(findkeysforcommand(command, 0)); // uses '...' strings for(j = 0; j < n; ++j) @@ -1247,14 +1255,17 @@ string getcommandkey(string text, string command) keys = strcat(keys, ", ", keynumtostring(k)); ++l; - if (autocvar_hud_showbinds_limit > 0 && autocvar_hud_showbinds_limit >= l) break; + if (autocvar_hud_showbinds_limit > 0 && autocvar_hud_showbinds_limit <= l) + break; } } + if (keys == "") + keys = "NO_KEY"; db_put(binddb, command, keys); } - if ("" == keys) { + if (keys == "NO_KEY") { if (autocvar_hud_showbinds > 1) return sprintf(_("%s (not bound)"), text); else