Skip to content

Commit

Permalink
Merge branch 'transparent-flag-for-defence' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
drzel committed Oct 13, 2024
2 parents 4800d8b + 221ad53 commit 8c0b26b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions csqc/pmove.qc
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,8 @@ static void ParseCvars() {

#define MUX_IN(ef, bit, src) \
do { if ((ef) & (bit)) { rad = max(rad, src.i); col += src.v; } } while (0)
static void LocalEffects() {
float effects = pstate_server.effects;

void LocalEffects(float effects, vector org) {
float rad = 0;
vector col = '0 0 0';

Expand All @@ -946,7 +946,7 @@ static void LocalEffects() {
MUX_IN(effects, EF_BLUE, bluelight_l);

rad = min(rad, 400);
dynamiclight_add(pm.vieworg, rad, col);
dynamiclight_add(org, rad, col, 0, "", 0);
}
#undef MUX_IN

Expand All @@ -958,7 +958,7 @@ void PM_UpdateView() {
makevectors(view_angles);
SetListener(pm.vieworg, v_forward, v_right, v_up);

LocalEffects();
LocalEffects(pstate_server.effects, pm.vieworg);
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 2 additions & 0 deletions csqc/tfx.qc
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ float UpdateFlag(float isnew) {

/* UpdateFlagOutline(self); */

LocalEffects(self.effects, self.origin);

if (self.skin == team_no) {
local float distance = vlen(self.origin - PM_Org());
self.alpha = min(0.25 + (distance / 200), 1);
Expand Down

0 comments on commit 8c0b26b

Please sign in to comment.