From 86fc22654298e917698c61d28ffe3c682b3bf49c Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 24 Jan 2025 23:12:46 +1000 Subject: [PATCH] Set the player's team to 0 in non-teamplay gamemodes --- qcsrc/client/weapons/projectile.qc | 5 ++++- qcsrc/server/teamplay.qc | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index dfd9c35f5..0ad653c6f 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -299,10 +299,10 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) } int proj_team = ReadByte(); - this.team = proj_team - 1; if(teamplay) { + this.team = proj_team - 1; if(proj_team) this.colormap = (this.team) * 0x11; // note: team - 1 on server (client uses different numbers) else @@ -310,7 +310,10 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) this.colormap |= BIT(10); // RENDER_COLORMAPPED } else + { + this.team = 0; this.colormap = proj_team; + } // TODO: projectiles use glowmaps for their color, not teams #if 0 if(this.colormap > 0) diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index f9da5a2d4..c442a78d6 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -162,7 +162,10 @@ void setcolor(entity this, int clr) { #if 1 this.clientcolors = clr; - this.team = (clr & 15) + 1; + if(teamplay) + this.team = (clr & 15) + 1; + else + this.team = 0; #else builtin_setcolor(this, clr); #endif -- 2.39.5