Skip to content

Commit 128cdc3

Browse files
committed
Merge branch 'transparent-flag-for-defence' into staging
2 parents a9e0adf + 223e64a commit 128cdc3

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

csqc/tfx.qc

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,18 @@ static void UpdateFlagOutline(entity flag) {
252252
}
253253

254254
float UpdateFlag(float isnew) {
255-
if (isnew) {
256-
float mindex = self.modelindex;
257-
AddOutline(self);
258-
// Flags have their own shader already, just make them shiny for now.
259-
}
255+
/* if (isnew) { */
256+
/* float mindex = self.modelindex; */
257+
/* AddOutline(self); */
258+
/* // Flags have their own shader already, just make them shiny for now. */
259+
/* } */
260+
261+
/* UpdateFlagOutline(self); */
260262

261-
UpdateFlagOutline(self);
263+
if (self.skin == team_no) {
264+
local float distance = vlen(self.origin - PM_Org());
265+
self.alpha = min(0.25 + (distance / 200), 1);
266+
}
262267

263268
return TRUE;
264269
}
@@ -309,4 +314,8 @@ void TF_Init() {
309314

310315
shader_over_outline = shaderforname(rnds("over_outline"), "{ sort 7 }");
311316
#endif
317+
318+
deltalisten("progs/ff_flag.mdl", UpdateFlag, 0);
319+
deltalisten("progs/tf_flag.mdl", UpdateFlag, 0);
320+
deltalisten("progs/tf_stan.mdl", UpdateFlag, 0);
312321
}

0 commit comments

Comments
 (0)