X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_client.qc;h=26393d79c6b07280ae05f8fd463fe7952857ddb7;hb=024719975962a1b3ca98ab2f73a8d89d66b1ce21;hp=b61fbfa913bb7e6612fc4f60f91d1081601aae95;hpb=5d91cc9be5e22267a8801a4a634d32b7a58fb060;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index b61fbfa91..26393d79c 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -406,13 +406,9 @@ void PutObserverInServer (void) if not(g_ca) // don't reset teams when moving a ca player to the spectators self.team = -1; // move this as it is needed to log the player spectating in eventlog - if(self.killcount != -666) { - if(g_lms) { - if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0 && self.lms_spectate_warning != 2) - Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_NOLIVES, self.netname); - else - Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_FORFEIT, self.netname); - } else { Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_SPECTATE, self.netname); } + if(self.killcount != -666) + { + Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_SPECTATE, self.netname); if(self.just_joined == FALSE) { LogTeamchange(self.playerid, -1, 4); @@ -503,14 +499,6 @@ void PutObserverInServer (void) Spawnqueue_Insert(self); } } - else if(g_lms) - { - // Only if the player cannot play at all - if(PlayerScore_Add(self, SP_LMS_RANK, 0) == 666) - self.frags = FRAGS_SPECTATOR; - else - self.frags = FRAGS_LMS_LOSER; - } else if(g_ca) { if(self.caplayer) @@ -611,21 +599,6 @@ void FixPlayermodel() setcolor(self, stof(autocvar_sv_defaultplayercolors)); } -void PlayerTouchExplode(entity p1, entity p2) -{ - vector org; - org = (p1.origin + p2.origin) * 0.5; - org_z += (p1.mins_z + p2.mins_z) * 0.5; - - te_explosion(org); - - entity e; - e = spawn(); - setorigin(e, org); - RadiusDamage(e, world, g_touchexplode_damage, g_touchexplode_edgedamage, g_touchexplode_radius, world, g_touchexplode_force, DEATH_TOUCHEXPLODE, world); - remove(e); -} - /* ============= PutClientInServer @@ -652,16 +625,11 @@ void PutClientInServer (void) // reset player keys self.itemkeys = 0; - // player is dead and becomes observer - // FIXME fix LMS scoring for new system - if(g_lms) - { - if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0) - self.classname = "observer"; - } - if((g_arena && !self.spawned) || (g_ca && !allowed_to_spawn)) self.classname = "observer"; + + if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0) + self.classname = "observer"; if(gameover) self.classname = "observer"; @@ -1417,7 +1385,7 @@ void ClientConnect (void) JoinBestTeam(self, FALSE, FALSE); // if the team number is valid, keep it - if((autocvar_sv_spectate == 1 && !g_lms) || autocvar_g_campaign || self.team_forced < 0) { + if(autocvar_g_campaign || self.team_forced < 0) { self.classname = "observer"; } else { if(teamplay) @@ -1519,15 +1487,6 @@ void ClientConnect (void) stuffcmd(self, "cl_cmd settemp chase_active 1\n"); } - if(g_lms) - { - if(PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives()) <= 0) - { - PlayerScore_Add(self, SP_LMS_RANK, 666); - self.frags = FRAGS_SPECTATOR; - } - } - if(!sv_foginterval && world.fog != "") stuffcmd(self, strcat("\nfog ", world.fog, "\nr_fog_exp2 0\nr_drawfog 1\n")); @@ -2003,7 +1962,7 @@ void player_regen (void) limita = limita * limit_mod; //limitf = limitf * limit_mod; - if(g_lms && g_ca) + if(g_lms || g_ca) rot_mod = 0; if (!g_minstagib && !g_ca && (!g_lms || autocvar_g_lms_regenerate)) @@ -2490,8 +2449,6 @@ void PlayerUseKey() MUTATOR_CALLHOOK(PlayerUseKey); } -.float touchexplode_time; - /* ============= PlayerPreThink @@ -2654,7 +2611,7 @@ void PlayerPreThink (void) if(frametime) player_anim(); button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USE); - force_respawn = (g_lms || g_ca || g_cts || autocvar_g_forced_respawn); + force_respawn = (g_ca || g_cts || autocvar_g_forced_respawn); if (self.deadflag == DEAD_DYING) { if(force_respawn) @@ -2689,55 +2646,6 @@ void PlayerPreThink (void) return; } - // FIXME from now on self.deadflag is always 0 (and self.health is never < 1) - // so (self.deadflag == DEAD_NO) is always true in the code below - - if(g_touchexplode) - if(time > self.touchexplode_time) - if(self.classname == "player") - if(self.deadflag == DEAD_NO) - if not(IS_INDEPENDENT_PLAYER(self)) - FOR_EACH_PLAYER(other) if(self != other) - { - if(time > other.touchexplode_time) - if(other.deadflag == DEAD_NO) - if not(IS_INDEPENDENT_PLAYER(other)) - if(boxesoverlap(self.absmin, self.absmax, other.absmin, other.absmax)) - { - PlayerTouchExplode(self, other); - self.touchexplode_time = other.touchexplode_time = time + 0.2; - } - } - - if(g_lms && !self.deadflag && autocvar_g_lms_campcheck_interval) - { - vector dist; - - // calculate player movement (in 2 dimensions only, so jumping on one spot doesn't count as movement) - dist = self.prevorigin - self.origin; - dist_z = 0; - self.lms_traveled_distance += fabs(vlen(dist)); - - if((autocvar_g_campaign && !campaign_bots_may_start) || (time < game_starttime)) - { - self.lms_nextcheck = time + autocvar_g_lms_campcheck_interval*2; - self.lms_traveled_distance = 0; - } - - if(time > self.lms_nextcheck) - { - //sprint(self, "distance: ", ftos(self.lms_traveled_distance), "\n"); - if(self.lms_traveled_distance < autocvar_g_lms_campcheck_distance) - { - Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_LMS_CAMPCHECK); - // FIXME KadaverJack: gibbing player here causes playermodel to bounce around, instead of eye.md3 - // I wasn't able to find out WHY that happens, so I put a workaround in place that shall prevent players from being gibbed :( - Damage(self, self, self, bound(0, autocvar_g_lms_campcheck_damage, self.health + self.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP, self.origin, '0 0 0'); - } - self.lms_nextcheck = time + autocvar_g_lms_campcheck_interval; - self.lms_traveled_distance = 0; - } - } self.prevorigin = self.origin;