X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_player.qc;h=4a5c8a00d2d4866e27f44f598ef3ba9e9942ae0b;hb=5b6514ad570d0210590f6fb10b6abd26df38cbd8;hp=03347a9c86d2cb718abae96a77c1eb855feb38a6;hpb=48388e38c1377c33f08feed8e76c0a2c9212a20c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 03347a9c8..4a5c8a00d 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -252,11 +252,6 @@ void player_anim (void) animdecide_setstate(self, animbits, FALSE); animdecide_setimplicitstate(self, (self.flags & FL_ONGROUND)); -#ifndef NO_LEGACY_NETWORKING - if(!self.iscsqcmodel) - animdecide_setframes(self, FALSE, frame, frame1time, frame2, frame2time); -#endif - if (self.weaponentity) { updateanim(self.weaponentity); @@ -267,10 +262,6 @@ void player_anim (void) void SpawnThrownWeapon (vector org, float w) { - if(g_minstagib) - if(self.ammo_cells <= 0) - return; - if(g_pinata) { float j; @@ -396,17 +387,10 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht else Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker); - if (!g_minstagib) - { - v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage); - take = v_x; - save = v_y; - } - else - { - save = 0; - take = damage; - } + + v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage); + take = v_x; + save = v_y; if(attacker == self) { @@ -472,7 +456,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht { self.pain_finished = time + 0.5; //Supajoe - if(sv_gentle < 1) { + if(autocvar_sv_gentle < 1) { if(self.classname != "body") // pain anim is BORKED on our ZYMs, FIXME remove this once we have good models { if (!self.animstate_override) @@ -559,7 +543,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht if(valid_damage_for_weaponstats) WeaponStats_LogKill(awep, abot, self.weapon, vbot); - if(sv_gentle < 1) // TODO make a "gentle" version? + if(autocvar_sv_gentle < 1) // TODO make a "gentle" version? if(sound_allowed(MSG_BROADCAST, attacker)) { if(deathtype == DEATH_DROWN) @@ -595,7 +579,6 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht // print an obituary message Obituary (attacker, inflictor, self, deathtype); race_PreDie(); - DropAllRunes(self); // increment frag counter for used weapon type float w; @@ -624,7 +607,6 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht if(clienttype(self) == CLIENTTYPE_REAL) { - stuffcmd(self, "-zoom\n"); self.fixangle = TRUE; //msg_entity = self; //WriteByte (MSG_ONE, SVC_SETANGLE); @@ -701,7 +683,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht // set up to fade out later SUB_SetFade (self, time + 6 + random (), 1); - if(sv_gentle > 0 || autocvar_ekg) { + if(autocvar_sv_gentle > 0 || autocvar_ekg) { // remove corpse PlayerCorpseDamage (inflictor, attacker, autocvar_sv_gibhealth+1.0, deathtype, hitloc, force); } @@ -938,17 +920,18 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f if(sourcecmsgstr != "" && !privatesay) centerprint(source, sourcecmsgstr); } - else if(privatesay) // private message, between 2 people only, not sent to server console + else if(privatesay) // private message, between 2 people only { sprint(source, sourcemsgstr); sprint(privatesay, msgstr); + if not(autocvar_g_chat_tellprivacy) { dedicated_print(msgstr); } // send to server console too if "tellprivacy" is disabled if(cmsgstr != "") centerprint(privatesay, cmsgstr); } else if(teamsay > 0) // team message, only sent to team mates { sprint(source, sourcemsgstr); - //print(msgstr); // send to server console too + dedicated_print(msgstr); // send to server console too if(sourcecmsgstr != "") centerprint(source, sourcecmsgstr); FOR_EACH_REALPLAYER(head) if(head.team == source.team) @@ -962,7 +945,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f else if(teamsay < 0) // spectator message, only sent to spectators { sprint(source, sourcemsgstr); - //print(msgstr); // send to server console too + dedicated_print(msgstr); // send to server console too FOR_EACH_REALCLIENT(head) if(head.classname != "player") if(head != source) sprint(head, msgstr); @@ -970,7 +953,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f else if(sourcemsgstr != msgstr) // trimmed/server fixed message, sent to all players { sprint(source, sourcemsgstr); - //print(msgstr); // send to server console too + dedicated_print(msgstr); // send to server console too FOR_EACH_REALCLIENT(head) if(head != source) sprint(head, msgstr); @@ -1152,7 +1135,7 @@ void FakeGlobalSound(string sample, float chan, float voicetype) break; if(!sv_taunt) break; - if(sv_gentle) + if(autocvar_sv_gentle) break; tauntrand = random(); msg_entity = self; @@ -1170,7 +1153,7 @@ void FakeGlobalSound(string sample, float chan, float voicetype) animdecide_setaction(self, ANIMACTION_TAUNT, TRUE); if(!sv_taunt) break; - if(sv_gentle) + if(autocvar_sv_gentle) break; msg_entity = self; if (msg_entity.cvar_cl_voice_directional >= 1) @@ -1249,7 +1232,7 @@ void GlobalSound(string sample, float chan, float voicetype) break; if(!sv_taunt) break; - if(sv_gentle) + if(autocvar_sv_gentle) break; tauntrand = random(); FOR_EACH_REALCLIENT(msg_entity) @@ -1267,7 +1250,7 @@ void GlobalSound(string sample, float chan, float voicetype) animdecide_setaction(self, ANIMACTION_TAUNT, TRUE); if(!sv_taunt) break; - if(sv_gentle) + if(autocvar_sv_gentle) break; FOR_EACH_REALCLIENT(msg_entity) { @@ -1315,14 +1298,8 @@ void VoiceMessage(string type, string msg) FakeGlobalSound(self.sample, CH_VOICE, voicetype); } -void MoveToTeam(entity client, float team_colour, float type, float show_message) +void MoveToTeam(entity client, float team_colour, float type) { -// show_message -// 0 (00) automove centerprint, admin message -// 1 (01) automove centerprint, no admin message -// 2 (10) no centerprint, admin message -// 3 (11) no centerprint, no admin message - float lockteams_backup; lockteams_backup = lockteams; // backup any team lock @@ -1331,14 +1308,9 @@ void MoveToTeam(entity client, float team_colour, float type, float show_message TeamchangeFrags(client); // move the players frags SetPlayerColors(client, team_colour - 1); // set the players colour - Damage(client, client, client, 100000, ((show_message & 2) ? DEATH_QUIET : DEATH_AUTOTEAMCHANGE), client.origin, '0 0 0'); // kill the player + Damage(client, client, client, 100000, DEATH_AUTOTEAMCHANGE, client.origin, '0 0 0'); // kill the player lockteams = lockteams_backup; // restore the team lock LogTeamchange(client.playerid, client.team, type); - - if not(show_message & 1) // admin message - sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: You have been moved to the ", Team_ColorNameLowerCase(team_colour), " team\n")); // send a chat message - - bprint(strcat(client.netname, " joined the ", ColoredTeamName(client.team), "\n")); }