mirror of
https://github.com/nzp-team/glquake.git
synced 2024-11-10 06:31:35 +00:00
Add support for more Perk lights
This commit is contained in:
parent
2315c6f07f
commit
8d2967b408
3 changed files with 56 additions and 68 deletions
103
source/cl_main.c
103
source/cl_main.c
|
@ -572,12 +572,6 @@ void CL_RelinkEntities (void)
|
|||
if (ent->model->flags & EF_ROTATE)
|
||||
ent->angles[1] = bobjrotate;
|
||||
|
||||
if (ent->effects & EF_BRIGHTFIELD)
|
||||
R_EntityParticles (ent);
|
||||
|
||||
if (ent->effects & EF_DARKFIELD)
|
||||
R_DarkFieldParticles (ent);
|
||||
|
||||
if (ent->effects & EF_MUZZLEFLASH)
|
||||
{
|
||||
if (i == cl.viewentity && qmb_initialized && r_part_muzzleflash.value)
|
||||
|
@ -616,38 +610,6 @@ void CL_RelinkEntities (void)
|
|||
}
|
||||
}
|
||||
|
||||
if (ent->modelindex != cl_modelindex[mi_player] && ent->model->modhint != MOD_PLAYER)
|
||||
{
|
||||
if (ent->effects & EF_BRIGHTLIGHT)
|
||||
{
|
||||
vec3_t tmp;
|
||||
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, tmp);
|
||||
tmp[2] += 16;
|
||||
dl->color[0] = 1;
|
||||
dl->color[1] = 0.8;
|
||||
dl->color[2] = 0.5;
|
||||
CL_NewDlight (i, tmp, 400 + (rand() & 31), 0.1, lt_default);
|
||||
}
|
||||
}
|
||||
|
||||
if (ent->effects & EF_DARKLIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->radius = 200.0 + (rand()&31);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->dark = true;
|
||||
}
|
||||
if (ent->effects & EF_LIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->radius = 200;
|
||||
dl->die = cl.time + 0.001;
|
||||
}
|
||||
|
||||
if (ent->effects & EF_BLUELIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
|
@ -681,27 +643,6 @@ void CL_RelinkEntities (void)
|
|||
dl->color[2] = 0;
|
||||
}
|
||||
|
||||
if (ent->effects & EF_GREENLIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->radius = 100;
|
||||
dl->color[0] = 0.25;
|
||||
dl->color[1] = 2;
|
||||
dl->color[2] = 0.25;
|
||||
}
|
||||
if (ent->effects & EF_ORANGELIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->radius = 100;
|
||||
dl->color[0] = 2;
|
||||
dl->color[1] = 1;
|
||||
dl->color[2] = 0;
|
||||
}
|
||||
|
||||
if (ent->effects & EF_GREENLIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
|
@ -724,6 +665,50 @@ void CL_RelinkEntities (void)
|
|||
dl->color[2] = 2;
|
||||
}
|
||||
|
||||
if (ent->effects & EF_CYANLIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->radius = 100;
|
||||
dl->color[0] = 0.765;
|
||||
dl->color[1] = 1.40;
|
||||
dl->color[2] = 1.95;
|
||||
}
|
||||
|
||||
if (ent->effects & EF_PINKLIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->radius = 100;
|
||||
dl->color[0] = 2.37;
|
||||
dl->color[1] = 1.35;
|
||||
dl->color[2] = 1.35;
|
||||
}
|
||||
|
||||
if (ent->effects & EF_LIMELIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->radius = 100;
|
||||
dl->color[0] = 1;
|
||||
dl->color[1] = 2;
|
||||
dl->color[2] = 1;
|
||||
}
|
||||
|
||||
if (ent->effects & EF_YELLOWLIGHT)
|
||||
{
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->radius = 100;
|
||||
dl->color[0] = 2;
|
||||
dl->color[1] = 2;
|
||||
dl->color[2] = 1;
|
||||
}
|
||||
|
||||
if (ent->effects & EF_RAYGREEN)
|
||||
{
|
||||
R_RocketTrail (oldorg, ent->origin, 12);
|
||||
|
|
|
@ -39,15 +39,15 @@ m*_t structures are in-memory
|
|||
#define EF_REDLIGHT 8
|
||||
#define EF_ORANGELIGHT 16
|
||||
#define EF_GREENLIGHT 32
|
||||
#define EF_LIGHT 64
|
||||
#define EF_PINKLIGHT 64 // formerly EF_LIGHT
|
||||
#define EF_NODRAW 128
|
||||
#define EF_BRIGHTFIELD 256
|
||||
#define EF_LIMELIGHT 256 // formerly EF_BRIGHTFIELD
|
||||
#define EF_FULLBRIGHT 512
|
||||
#define EF_DARKLIGHT 1024
|
||||
#define EF_DARKFIELD 2048
|
||||
#define EF_CYANLIGHT 1024 // formerly EF_DARKLIGHT
|
||||
#define EF_YELLOWLIGHT 2048 // formerly EF_DARKFIELD
|
||||
#define EF_PURPLELIGHT 4096
|
||||
#define EF_RAYRED 8196 // red trail for porter x2
|
||||
#define EF_RAYGREEN 16384 // gree trail for ray gun
|
||||
#define EF_RAYGREEN 16384 // green trail for ray gun
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -175,12 +175,15 @@ typedef struct client_s
|
|||
#define EF_REDLIGHT 8
|
||||
#define EF_ORANGELIGHT 16
|
||||
#define EF_GREENLIGHT 32
|
||||
#define EF_LIGHT 64
|
||||
#define EF_PINKLIGHT 64 // formerly EF_LIGHT
|
||||
#define EF_NODRAW 128
|
||||
#define EF_BRIGHTFIELD 256
|
||||
#define EF_LIMELIGHT 256 // formerly EF_BRIGHTFIELD
|
||||
#define EF_FULLBRIGHT 512
|
||||
#define EF_DARKLIGHT 1024
|
||||
#define EF_DARKFIELD 2048
|
||||
#define EF_CYANLIGHT 1024 // formerly EF_DARKLIGHT
|
||||
#define EF_YELLOWLIGHT 2048 // formerly EF_DARKFIELD
|
||||
#define EF_PURPLELIGHT 4096
|
||||
#define EF_RAYRED 8196 // red trail for porter x2
|
||||
#define EF_RAYGREEN 16384 // green trail for ray gun
|
||||
|
||||
#define SPAWNFLAG_NOT_EASY 256
|
||||
#define SPAWNFLAG_NOT_MEDIUM 512
|
||||
|
|
Loading…
Reference in a new issue