Game-tic lights and recon car headlights.

git-svn-id: https://svn.eduke32.com/eduke32@1303 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2009-04-12 13:02:36 +00:00
parent 6477b236b2
commit 80670cac29
3 changed files with 32 additions and 0 deletions

View file

@ -164,6 +164,9 @@ typedef struct s_prlight {
extern _prlight staticlights[PR_MAXLIGHTS];
extern int32_t staticlightcount;
extern _prlight gamelights[PR_MAXLIGHTS];
extern int32_t gamelightcount;
// RENDER TARGETS
typedef struct s_prrt {
GLenum target;

View file

@ -134,6 +134,9 @@ int32_t curlight;
_prlight staticlights[PR_MAXLIGHTS];
int32_t staticlightcount;
_prlight gamelights[PR_MAXLIGHTS];
int32_t gamelightcount;
GLfloat shadowBias[] =
{
@ -699,6 +702,13 @@ void polymer_drawrooms(int32_t daposx, int32_t daposy, int32_t da
polymer_dostaticlights();
i = 0;
while (i < gamelightcount)
{
polymer_addlight(gamelights[i]);
i++;
}
depth = 0;
polymer_prepareshadows();

View file

@ -3568,6 +3568,23 @@ static void G_MoveActors(void)
if (s->z < sector[sect].ceilingz+(32<<8))
s->z = sector[sect].ceilingz+(32<<8);
gamelights[gamelightcount].sector = s->sectnum;
gamelights[gamelightcount].x = s->x;
gamelights[gamelightcount].y = s->y;
gamelights[gamelightcount].z = s->z + 10248;
gamelights[gamelightcount].range = 8192;
gamelights[gamelightcount].angle = s->ang;
gamelights[gamelightcount].horiz = 100;
gamelights[gamelightcount].radius = 256;
gamelights[gamelightcount].faderadius = 200;
gamelights[gamelightcount].color[0] = 255;
gamelights[gamelightcount].color[1] = 255;
gamelights[gamelightcount].color[2] = 255;
gamelightcount++;
if (ud.multimode < 2)
{
if (g_noEnemies == 1)
@ -7593,6 +7610,8 @@ int32_t A_CheckSwitchTile(int32_t i)
void G_MoveWorld(void)
{
gamelightcount = 0;
G_MoveZombieActors(); //ST 2
G_MoveWeapons(); //ST 4
G_MoveTransports(); //ST 9