X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_client.qc;h=d53fe2082309958f83602af3d5556a42285367ee;hp=d79c07465a858e5084489a47ef995c8dd3d75638;hb=ad1729bd8b56b054466689731f0a2f59f13e55ee;hpb=1bee0bfd4cbbb160b775164f2723072474f66a62 diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index d79c07465a..d53fe20823 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -170,7 +170,7 @@ void PutObserverInServer (void) if(self.alivetime) { - if(!inWarmupStage) + if(!warmup_stage) PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime); self.alivetime = 0; } @@ -297,7 +297,13 @@ void FixPlayermodel() n = tokenize_console(defaultmodel); if(n > 0) + { defaultmodel = argv(floor(n * self.model_randomizer)); + // However, do NOT randomize if the player-selected model is in the list. + for (i = 0; i < n; ++i) + if ((argv(i) == self.playermodel && defaultskin == stof(self.playerskin)) || argv(i) == strcat(self.playermodel, ":", self.playerskin)) + defaultmodel = argv(i); + } i = strstrofs(defaultmodel, ":", 0); if(i >= 0) @@ -424,7 +430,7 @@ void PutClientInServer (void) self.nex_charge = autocvar_g_balance_nex_charge_start; } - if(inWarmupStage) + if(warmup_stage) { self.ammo_shells = warmup_start_ammo_shells; self.ammo_nails = warmup_start_ammo_nails; @@ -433,7 +439,11 @@ void PutClientInServer (void) self.ammo_fuel = warmup_start_ammo_fuel; self.health = warmup_start_health; self.armorvalue = warmup_start_armorvalue; - self.weapons = warmup_start_weapons; + + if(g_warmup_allguns == 2) + self.weapons = warmup_start_weapons; + else if(g_warmup_allguns == 1) + self.weapons = (warmup_start_weapons & (weaponsInMap | start_weapons)); } else { @@ -593,7 +603,7 @@ void PutClientInServer (void) self.weaponname = ""; self.switchingweapon = 0; - if(!inWarmupStage) + if(!warmup_stage) if(!self.alivetime) self.alivetime = time; @@ -811,7 +821,7 @@ void KillIndicator_Think() if(IS_REAL_CLIENT(self.owner)) { if(self.cnt <= 10) - { Send_Notification(NOTIF_ONE, self.owner, MSG_ANNCE, Announcer_PickNumber(self.cnt)); } + { Send_Notification(NOTIF_ONE, self.owner, MSG_ANNCE, Announcer_PickNumber(CNT_KILL, self.cnt)); } } self.nextthink = time + 1; self.cnt -= 1; @@ -1910,7 +1920,7 @@ void ShowRespawnCountdown() { self.respawn_countdown = number - 1; if(ceil(self.respawn_time - (time + 0.5)) == number) // only say it if it is the same number even in 0.5s; to prevent overlapping sounds - Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(number)); + { Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(CNT_RESPAWN, number)); } } } } @@ -2039,7 +2049,7 @@ void PrintWelcomeMessage() { if(self.BUTTON_INFO) // BUTTON_INFO hides initial MOTD self.motd_actived_time = -2; // wait until BUTTON_INFO gets released - else if(self.motd_actived_time == -2 || IS_PLAYER(self) || time - self.jointime > autocvar_welcome_message_time) + else if(self.motd_actived_time == -2 || IS_PLAYER(self)) { // instanctly hide MOTD self.motd_actived_time = 0; @@ -2541,7 +2551,7 @@ void PlayerPostThink (void) else if(timeleft <= 10) { if(timeleft != self.idlekick_lasttimeleft) - Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(timeleft)); + { Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(CNT_IDLE, timeleft)); } self.idlekick_lasttimeleft = timeleft; } } @@ -2591,7 +2601,7 @@ void PlayerPostThink (void) //pointparticles(particleeffectnum("machinegun_impact"), self.origin + self.view_ofs + '0 0 7', '0 0 0', 1); if(self.waypointsprite_attachedforcarrier) - WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent)); + WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON)); playerdemo_write();