Gamerules: exception for friendlyfire when it comes to self

point_message: make messages appear through entities, as they may be translucent.
Fixed a minor warning.
This commit is contained in:
Marco Cawthorne 2022-04-21 18:50:21 -07:00
parent 8037f2d58b
commit 7395b8d421
Signed by: eukara
GPG Key ID: C196CD8BA993248A
3 changed files with 3 additions and 2 deletions

View File

@ -77,7 +77,7 @@ PointMessage_Visible(vector p1, vector p2, vector ang)
fov = delta * v_forward;
if (fov > 0.3) {
traceline(p2, p1, TRUE, self);
traceline(p2, p1, MOVE_WORLDONLY, self);
if (trace_fraction == 1.0) {
return (1);
}

View File

@ -214,6 +214,7 @@ CGameRules::DamageApply(entity t, entity c, float dmg, int w, damageType_t type)
/* friendly fire */
if (autocvar_sv_friendlyFire == false)
if (t != c)
if (IsTeamPlay()) {
if (t.flags & FL_CLIENT && c.flags & FL_CLIENT)
if (t.team == c.team)

View File

@ -365,7 +365,7 @@ spectator::SpectatorTrackPlayer(void)
if (b && b.classname == "player")
if (b.IsFakeSpectator()) {
b = world;
b = 0;
spec_mode = SPECMODE_FREE;
InputNext();
}