git-svn-id: https://svn.eduke32.com/eduke32@1319 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2009-04-14 07:15:08 +00:00
parent dfd2a379b1
commit cc701a3908
3 changed files with 58 additions and 22 deletions

View file

@ -597,35 +597,39 @@ static void G_MoveZombieActors(void)
case FLOORFLAME__STATIC:
case FIREBARREL__STATIC:
case FIREVASE__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 4096, 255+(80<<8),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),0);
break;
case ATOMICHEALTH__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 128+(128<<8)+(255<<16),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),0);
break;
case FIRE__STATIC:
case FIRE2__STATIC:
/*
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
if (s->z > ActorExtra[i].floorz+2048) break;
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 64 * s->xrepeat, 255+(80<<8),0);
*/
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
break;
case BURNING__STATIC:
case BURNING2__STATIC:
/*
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
if (s->z > ActorExtra[i].floorz + 2048) break;
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 64 * s->xrepeat, 255+(80<<8),0);
*/
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
break;
case EXPLOSION2__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 4096, 255+(80<<8),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),0);
break;
case FORCERIPPLE__STATIC:
// case TRANSPORTERSTAR__STATIC:
case TRANSPORTERBEAM__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 80+(80<<8)+(255<<16),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 80+(80<<8)+(255<<16),0);
break;
case SHRINKEREXPLOSION__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 128+(255<<8)+(128<<16),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),0);
break;
}
@ -2173,7 +2177,7 @@ CLEAR_THE_BOLT:
case FLOORFLAME__STATIC:
case FIREBARREL__STATIC:
case FIREVASE__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 4096, 255+(80<<8),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),0);
case EXPLODINGBARREL__STATIC:
case WOODENHORSE__STATIC:
case HORSEONSIDE__STATIC:
@ -2276,7 +2280,7 @@ static void G_MoveWeapons(void)
// A_PlaySound(WIERDSHOT_FLY,i);
if (ActorExtra[i].projectile.flashcolor)
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, ActorExtra[i].projectile.flashcolor,0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, ActorExtra[i].projectile.flashcolor,0);
if (ActorExtra[i].projectile.workslike & PROJECTILE_BOUNCESOFFWALLS)
{
@ -2723,20 +2727,20 @@ static void G_MoveWeapons(void)
switch (DynamicTileMap[s->picnum])
{
case FREEZEBLAST__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 128+(128<<8)+(255<<16),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),0);
break;
case COOLEXPLOSION1__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 3072, 128+(0<<8)+(255<<16),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 3072, 128+(0<<8)+(255<<16),0);
break;
case SHRINKSPARK__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 128+(255<<8)+(128<<16),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),0);
break;
case RPG__STATIC:
case FIRELASER__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 1024, 255+(80<<8),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 1024, 255+(80<<8),0);
if (DynamicTileMap[s->picnum] == RPG__STATIC && ActorExtra[i].picnum != BOSS2 &&
s->xrepeat >= 10 && sector[s->sectnum].lotag != 2)
@ -3382,14 +3386,16 @@ static void G_MoveActors(void)
switch (DynamicTileMap[switchpicnum])
{
case ATOMICHEALTH__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 128+(128<<8)+(255<<16),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),0);
break;
case FIRE__STATIC:
case FIRE2__STATIC:
/*
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
if (s->z > ActorExtra[i].floorz+2048) break;
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 64 * s->xrepeat, 255+(80<<8),0);
*/
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
break;
case DUCK__STATIC:
@ -5138,21 +5144,23 @@ static void G_MoveMisc(void) // STATNUM 5
{
case BURNING__STATIC:
case BURNING2__STATIC:
/*
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
if (s->z > ActorExtra[i].floorz + 2048) break;
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 64 * s->xrepeat, 255+(80<<8),0);
*/
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
break;
case EXPLOSION2__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 4096, 255+(80<<8),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),0);
break;
case FORCERIPPLE__STATIC:
// case TRANSPORTERSTAR__STATIC:
case TRANSPORTERBEAM__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 80+(80<<8)+(255<<16),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 80+(80<<8)+(255<<16),0);
break;
case SHRINKEREXPLOSION__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 128+(255<<8)+(128<<16),0);
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),0);
break;
}
if (!actorscrptr[sprite[i].picnum])

View file

@ -5530,6 +5530,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
break;
case EXPLOSION2__STATIC:
G_AddGameLight(0, sp->sectnum, sp->x, sp->y, sp->z-((sp->yrepeat*tilesizy[sp->picnum])<<1), 8192, 255+(80<<8),0);
case EXPLOSION2BOT__STATIC:
case BURNING__STATIC:
case BURNING2__STATIC:
@ -7376,7 +7377,7 @@ PALONLY:
framelights[framelightcount & (PR_MAXLIGHTS-1)].x = t->x+((sintable[(t->ang+512)&2047])>>7);
framelights[framelightcount & (PR_MAXLIGHTS-1)].y = t->y+((sintable[(t->ang)&2047])>>7);
framelights[framelightcount & (PR_MAXLIGHTS-1)].z = t->z-1024;
framelights[framelightcount & (PR_MAXLIGHTS-1)].z = t->z-((t->yrepeat*tilesizy[t->picnum])<<1);
framelights[framelightcount & (PR_MAXLIGHTS-1)].range = 1024;
@ -7417,7 +7418,7 @@ PALONLY:
framelights[framelightcount & (PR_MAXLIGHTS-1)].x = t->x+((sintable[(t->ang+512)&2047])>>7);
framelights[framelightcount & (PR_MAXLIGHTS-1)].y = t->y+((sintable[(t->ang)&2047])>>7);
framelights[framelightcount & (PR_MAXLIGHTS-1)].z = t->z-1024;
framelights[framelightcount & (PR_MAXLIGHTS-1)].z = t->z-((t->yrepeat*tilesizy[t->picnum])<<1);
framelights[framelightcount & (PR_MAXLIGHTS-1)].range = 1024;
@ -12813,7 +12814,8 @@ static int32_t G_DoMoveThings(void)
if (ud.recstat == 1) G_DemoRecord();
gamelightcount = 0;
if (ud.pause_on == 0)
gamelightcount = 0;
if (ud.pause_on == 0)
{

View file

@ -384,6 +384,32 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
{
/* Custom projectiles. This is a big hack. */
if (ProjectileData[atwith].flashcolor)
{
G_AddGameLight(0, s->sectnum, s->x+((sintable[(s->ang+512)&2047])>>7),
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 4096, ProjectileData[atwith].flashcolor,0);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = s->z-PHEIGHT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = 8192;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = (s->ang+1024)&2047;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = 100;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = ProjectileData[atwith].flashcolor&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = (ProjectileData[atwith].flashcolor>>8)&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = (ProjectileData[atwith].flashcolor>>16)&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
}
if (ProjectileData[atwith].offset == 0) ProjectileData[atwith].offset = 1;
if (ProjectileData[atwith].workslike & PROJECTILE_BLOOD || ProjectileData[atwith].workslike & PROJECTILE_KNEE)