Skip to content

Commit 6b1f7b0

Browse files
authored
Merge pull request #150 from qw-ctf/fix-baselines
SERVER: Initialize trans & colourmod baselines.
2 parents 79bf209 + 7edc207 commit 6b1f7b0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sv_init.c

+10
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,16 @@ static void SV_CreateBaseline (void)
130130
svent->e.baseline.colormap = 0;
131131
svent->e.baseline.modelindex = svent->v->modelindex;
132132
}
133+
134+
#ifdef FTE_PEXT_TRANS
135+
svent->e.baseline.trans = svent->xv.alpha >= 1.0f ? 0 : bound(0, (byte)(svent->xv.alpha * 254.0), 254);
136+
#endif
137+
#ifdef FTE_PEXT_COLOURMOD
138+
svent->e.baseline.colourmod[0] = bound(0, svent->xv.colourmod[0] * (256.0f / 8.0f), 255);
139+
svent->e.baseline.colourmod[1] = bound(0, svent->xv.colourmod[1] * (256.0f / 8.0f), 255);
140+
svent->e.baseline.colourmod[2] = bound(0, svent->xv.colourmod[2] * (256.0f / 8.0f), 255);
141+
#endif
142+
133143
}
134144
sv.num_baseline_edicts = sv.num_edicts;
135145
}

0 commit comments

Comments
 (0)