mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
attempt to fix the dark models at centers of dlights
This commit is contained in:
parent
8e97d6279a
commit
2abaf27cdc
1 changed files with 5 additions and 3 deletions
|
@ -543,10 +543,12 @@ R_DrawAliasModel (entity_t *e, qboolean cull)
|
||||||
|
|
||||||
for (lnum = 0; lnum < r_maxdlights; lnum++) {
|
for (lnum = 0; lnum < r_maxdlights; lnum++) {
|
||||||
if (r_dlights[lnum].die >= r_realtime) {
|
if (r_dlights[lnum].die >= r_realtime) {
|
||||||
|
float d;
|
||||||
|
|
||||||
VectorSubtract (e->origin, r_dlights[lnum].origin, dist);
|
VectorSubtract (e->origin, r_dlights[lnum].origin, dist);
|
||||||
add = ((r_dlights[lnum].radius
|
d = DotProduct (dist, dist);
|
||||||
* r_dlights[lnum].radius * 8)
|
d = max (d, 1);
|
||||||
/ DotProduct (dist, dist)); // FIXME Deek
|
add = r_dlights[lnum].radius * r_dlights[lnum].radius * 8 / d;
|
||||||
|
|
||||||
if (add > 0) {
|
if (add > 0) {
|
||||||
VectorMA (ambientcolor, add, r_dlights[lnum].color,
|
VectorMA (ambientcolor, add, r_dlights[lnum].color,
|
||||||
|
|
Loading…
Reference in a new issue