X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_player.qc;h=fd14d42b8d9aa4718450f3a68591d0a4a04bfc0c;hb=5f5505ba20abda2ac0d8eec592d6082846a49b19;hp=5a162742387c471883838d67a24a478e21357786;hpb=5c261e6c8b328196282545db4b6d1b85df2a12d5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 5a1627423..fd14d42b8 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -360,7 +360,7 @@ void SpawnThrownWeapon (vector org, float w) float j; for(j = WEP_FIRST; j <= WEP_LAST; ++j) { - if(self.weapons & W_WeaponBit(j)) + if(WEPSET_CONTAINS_EW(self, j)) if(W_IsWeaponThrowable(j)) W_ThrowNewWeapon(self, j, FALSE, org, randomvec() * 175 + '0 0 325'); } @@ -599,6 +599,8 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht vbot = (clienttype(self) == CLIENTTYPE_BOT); valid_damage_for_weaponstats = 0; + awep = 0; + if(vbot || clienttype(self) == CLIENTTYPE_REAL) if(abot || clienttype(attacker) == CLIENTTYPE_REAL) if(attacker && self != attacker) @@ -805,14 +807,12 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f // 0 = reject // -1 = fake accept { - string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, privatemsgprefix; - float flood, privatemsgprefixlen; + string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr; + float flood; var .float flood_field; entity head; float ret; - - if(Ban_MaybeEnforceBan(source)) - return 0; + string privatemsgprefix = string_null; float privatemsgprefixlen = 0; if(!teamsay && !privatesay) if(substring(msgin, 0, 1) == " ") @@ -825,7 +825,10 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f else if(teamplay) colorstr = Team_ColorCode(source.team); else + { + colorstr = ""; teamsay = FALSE; + } if(intermission_running) teamsay = FALSE; @@ -884,6 +887,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f // FLOOD CONTROL flood = 0; + flood_field = floodcontrol_chat; if(floodcontrol) { float flood_spl; @@ -979,7 +983,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f if(source.classname != "player") { if not(intermission_running) - if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !inWarmupStage)) + if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !(inWarmupStage || gameover))) teamsay = -1; // spectators }