X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_client.qc;h=b7072849c59b9e9cd9dacf1d7cd5e9fedf2c620b;hb=a11e3217808e6c8f2c971401ba2bcc43578832b1;hp=33491ff0e7bfa49cbbaae33e434094f83c11c084;hpb=125d619e9ab2a307b15b7ee1a2ededed32c7e84d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 33491ff0e..b7072849c 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -186,7 +186,7 @@ void PutObserverInServer (void) entity spot; self.hud = HUD_NORMAL; - if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); } + if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); } spot = SelectSpawnPoint (true); if(!spot) @@ -195,6 +195,7 @@ void PutObserverInServer (void) if(IS_REAL_CLIENT(self)) { + Item_ItemsTime_SetTimesForPlayer(self); msg_entity = self; WriteByte(MSG_ONE, SVC_SETVIEW); WriteEntity(MSG_ONE, self); @@ -226,7 +227,8 @@ void PutObserverInServer (void) if(self.killcount != -666) { Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_SPECTATE, self.netname); - if(autocvar_g_chat_nospectators == 1 || (cvar("g_warmup") && !(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2)) + if(!intermission_running) + if(autocvar_g_chat_nospectators == 1 || (!(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2)) Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_CHAT_NOSPECTATORS); if(self.just_joined == false) { @@ -420,7 +422,7 @@ void PutClientInServer (void) // reset player keys self.itemkeys = 0; - MUTATOR_CALLHOOK(PutClientInServer); + MUTATOR_CALLHOOK(PutClientInServer, self); if(gameover) self.classname = "observer"; @@ -506,6 +508,9 @@ void PutClientInServer (void) else self.superweapons_finished = 0; + if(!warmup_stage) + Item_ItemsTime_ResetTimesForPlayer(self); + if(g_weaponarena_random) // WEAPONTODO: more stuff that should be in a mutator. also: rename those cvars { if(g_weaponarena_random_with_blaster) @@ -639,8 +644,7 @@ void PutClientInServer (void) Unfreeze(self); - spawn_spot = spot; - MUTATOR_CALLHOOK(PlayerSpawn); + MUTATOR_CALLHOOK(PlayerSpawn, spot); if(autocvar_spawn_debug) { @@ -1275,7 +1279,7 @@ void ClientConnect (void) self = oldself; } - MUTATOR_CALLHOOK(ClientConnect); + MUTATOR_CALLHOOK(ClientConnect, self); } /* ============= @@ -1299,7 +1303,7 @@ void ClientDisconnect (void) PlayerStats_GameReport_FinalizePlayer(self); - if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); } + if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); } CheatShutdownClient(); @@ -1436,7 +1440,7 @@ void respawn(void) self.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed; self.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3; self.effects |= CSQCMODEL_EF_RESPAWNGHOST; - pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1); + Send_Effect("respawn_ghost", self.origin, '0 0 0', 1); if(autocvar_g_respawn_ghosts_maxtime) SUB_SetFade (self, time + autocvar_g_respawn_ghosts_maxtime / 2 + random () * (autocvar_g_respawn_ghosts_maxtime - autocvar_g_respawn_ghosts_maxtime / 2), 1.5); } @@ -1458,7 +1462,7 @@ void play_countdown(float finished, string samp) void player_powerups (void) { // add a way to see what the items were BEFORE all of these checks for the mutator hook - olditems = self.items; + int items_prev = self.items; if((self.items & IT_USING_JETPACK) && !self.deadflag && !gameover) self.modelflags |= MF_ROCKET; @@ -1570,7 +1574,7 @@ void player_powerups (void) if (time < self.spawnshieldtime) self.effects = self.effects | (EF_ADDITIVE | EF_FULLBRIGHT); - MUTATOR_CALLHOOK(PlayerPowerups); + MUTATOR_CALLHOOK(PlayerPowerups, self, items_prev); } float CalcRegen(float current, float stable, float regenfactor, float regenframetime) @@ -1622,11 +1626,7 @@ void player_regen (void) { float max_mod, regen_mod, rot_mod, limit_mod; max_mod = regen_mod = rot_mod = limit_mod = 1; - regen_mod_max = max_mod; - regen_mod_regen = regen_mod; - regen_mod_rot = rot_mod; - regen_mod_limit = limit_mod; - if(!MUTATOR_CALLHOOK(PlayerRegen)) + if(!MUTATOR_CALLHOOK(PlayerRegen, max_mod, regen_mod, rot_mod, limit_mod)) if(!self.frozen) { float minh, mina, maxh, maxa, limith, limita; @@ -1701,8 +1701,7 @@ spectate mode routines */ void SpectateCopy(entity spectatee) { - other = spectatee; - MUTATOR_CALLHOOK(SpectateCopy); + MUTATOR_CALLHOOK(SpectateCopy, spectatee, self); self.armortype = spectatee.armortype; self.armorvalue = spectatee.armorvalue; self.ammo_cells = spectatee.ammo_cells; @@ -2226,6 +2225,8 @@ void PlayerPreThink (void) self.stat_allow_oldvortexbeam = autocvar_g_allow_oldvortexbeam; self.stat_leadlimit = autocvar_leadlimit; + self.weaponsinmap = weaponsInMap; + if(frametime) { // physics frames: update anticheat stuff