X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2FMain.qc;h=d1fe46d235f5b609d1dbc1951df875e844fcabec;hb=df110eb632e3d04119c2d0771e0d54c1a1ea27b8;hp=9a3f587d322e5009be64c35c11c573329ca8caba;hpb=fca9d306878750e9523e97225c36a4237559b729;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 9a3f587d3..d1fe46d23 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -53,7 +53,7 @@ void CSQC_Init(void) check_unacceptable_compiler_bugs(); #ifdef WATERMARK - printf(_("^4CSQC Build information: ^1%s\n"), WATERMARK); + dprintf("^4CSQC Build information: ^1%s\n", WATERMARK); #endif float i; @@ -87,12 +87,17 @@ void CSQC_Init(void) registercvar("hud_usecsqc", "1"); registercvar("scoreboard_columns", "default"); + registercvar("cl_nade_type", "3"); + registercvar("cl_pokenade_type", "zombie"); + gametype = 0; // hud_fields uses strunzone on the titles! for(i = 0; i < MAX_HUD_FIELDS; ++i) hud_title[i] = strzone("(null)"); + Cmd_HUD_SetFields(0); + postinit = false; calledhooks = 0; @@ -109,6 +114,7 @@ void CSQC_Init(void) CALL_ACCUMULATED_FUNCTION(RegisterNotifications); CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes); CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels); + CALL_ACCUMULATED_FUNCTION(RegisterBuffs); WaypointSprite_Load(); @@ -213,7 +219,7 @@ float SetTeam(entity o, float Team) default: if(GetTeam(Team, false) == world) { - printf(_("trying to switch to unsupported team %d\n"), Team); + dprintf("trying to switch to unsupported team %d\n", Team); Team = NUM_SPECTATOR; } break; @@ -229,7 +235,7 @@ float SetTeam(entity o, float Team) default: if(GetTeam(Team, false) == world) { - printf(_("trying to switch to unsupported team %d\n"), Team); + dprintf("trying to switch to unsupported team %d\n", Team); Team = NUM_SPECTATOR; } break; @@ -311,8 +317,6 @@ void Porto_Init(); void TrueAim_Init(); void PostInit(void) { - localcmd(strcat("\nscoreboard_columns_set ", autocvar_scoreboard_columns, ";\n")); - entity playerchecker; playerchecker = spawn(); playerchecker.think = Playerchecker_Think; @@ -601,6 +605,27 @@ void Ent_Nagger() warmup_stage = (nags & 16); } +void Ent_EliminatedPlayers() +{ + float sf, i, j, b, f; + + sf = ReadByte(); + if(sf & 1) + { + for(j = 0; j < maxclients; ++j) + if(playerslots[j]) + playerslots[j].eliminated = 1; + for(i = 1; i <= maxclients; i += 8) + { + f = ReadByte(); + for(j = i-1, b = 1; b < 256; b *= 2, ++j) + if (!(f & b)) + if(playerslots[j]) + playerslots[j].eliminated = 0; + } + } +} + void Ent_RandomSeed() { float s; @@ -799,6 +824,7 @@ void CSQC_Ent_Update(float bIsNewEntity) case ENT_CLIENT_RAINSNOW: Ent_RainOrSnow(); break; case ENT_CLIENT_LASER: Ent_Laser(); break; case ENT_CLIENT_NAGGER: Ent_Nagger(); break; + case ENT_CLIENT_ELIMINATEDPLAYERS: Ent_EliminatedPlayers(); break; case ENT_CLIENT_WAYPOINT: Ent_WaypointSprite(); break; case ENT_CLIENT_RADARLINK: Ent_RadarLink(); break; case ENT_CLIENT_PROJECTILE: Ent_Projectile(); break; @@ -828,10 +854,11 @@ void CSQC_Ent_Update(float bIsNewEntity) case ENT_CLIENT_SPAWNPOINT: Ent_ReadSpawnPoint(bIsNewEntity); break; case ENT_CLIENT_SPAWNEVENT: Ent_ReadSpawnEvent(bIsNewEntity); break; case ENT_CLIENT_NOTIFICATION: Read_Notification(bIsNewEntity); break; + case ENT_CLIENT_HEALING_ORB: ent_healer(); 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)); + error(sprintf("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n", self.enttype, num_for_edict(self), self.classname)); break; } @@ -935,11 +962,15 @@ void Ent_ScoresInfo() HUD_ModIcons_SetFunc(); for(i = 0; i < MAX_SCORE; ++i) { + if(scores_label[i]) + strunzone(scores_label[i]); scores_label[i] = strzone(ReadString()); scores_flags[i] = ReadByte(); } for(i = 0; i < MAX_TEAMSCORE; ++i) { + if(teamscores_label[i]) + strunzone(teamscores_label[i]); teamscores_label[i] = strzone(ReadString()); teamscores_flags[i] = ReadByte(); } @@ -968,8 +999,8 @@ void Ent_Init() armorblockpercent = ReadByte() / 255.0; - g_balance_grenadelauncher_bouncefactor = ReadCoord(); - g_balance_grenadelauncher_bouncestop = ReadCoord(); + g_balance_mortar_bouncefactor = ReadCoord(); + g_balance_mortar_bouncestop = ReadCoord(); g_balance_electro_secondary_bouncefactor = ReadCoord(); g_balance_electro_secondary_bouncestop = ReadCoord(); @@ -1295,7 +1326,7 @@ string getcommandkey(string text, string command) return text; } else if (autocvar_hud_showbinds > 1) - return sprintf(_("%s (%s)"), text, keys); + return sprintf("%s (%s)", text, keys); else return keys; }