diff --git a/polymer/eduke32/build/include/polymer.h b/polymer/eduke32/build/include/polymer.h index 82cf98519..b01ebbb51 100644 --- a/polymer/eduke32/build/include/polymer.h +++ b/polymer/eduke32/build/include/polymer.h @@ -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; diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index d4ecf4a9e..a06f9987e 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -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(); diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 1d8ce946e..69a5bed4e 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -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