Skip to content

Commit

Permalink
Merge pull request #150 from qw-ctf/fix-baselines
Browse files Browse the repository at this point in the history
SERVER: Initialize trans & colourmod baselines.
  • Loading branch information
dsvensson authored Jan 14, 2025
2 parents 79bf209 + 7edc207 commit 6b1f7b0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ static void SV_CreateBaseline (void)
svent->e.baseline.colormap = 0;
svent->e.baseline.modelindex = svent->v->modelindex;
}

#ifdef FTE_PEXT_TRANS
svent->e.baseline.trans = svent->xv.alpha >= 1.0f ? 0 : bound(0, (byte)(svent->xv.alpha * 254.0), 254);
#endif
#ifdef FTE_PEXT_COLOURMOD
svent->e.baseline.colourmod[0] = bound(0, svent->xv.colourmod[0] * (256.0f / 8.0f), 255);
svent->e.baseline.colourmod[1] = bound(0, svent->xv.colourmod[1] * (256.0f / 8.0f), 255);
svent->e.baseline.colourmod[2] = bound(0, svent->xv.colourmod[2] * (256.0f / 8.0f), 255);
#endif

}
sv.num_baseline_edicts = sv.num_edicts;
}
Expand Down

0 comments on commit 6b1f7b0

Please sign in to comment.