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

This commit is contained in:
terminx 2009-04-24 06:04:13 +00:00
parent 26ca7e7fc0
commit 9dc32d2ded
8 changed files with 100 additions and 88 deletions

View file

@ -692,7 +692,7 @@ static void G_MoveZombieActors(void)
default: default:
ActorExtra[i].timetosleep = 0; ActorExtra[i].timetosleep = 0;
A_PlayAlertSound(i); A_PlayAlertSound(i);
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
break; break;
} }
else ActorExtra[i].timetosleep = 0; else ActorExtra[i].timetosleep = 0;
@ -3897,7 +3897,7 @@ static void G_MoveActors(void)
if (ActorExtra[i].timetosleep > SLEEPTIME) if (ActorExtra[i].timetosleep > SLEEPTIME)
{ {
ActorExtra[i].timetosleep = 0; ActorExtra[i].timetosleep = 0;
changespritestat(i,2); changespritestat(i, STAT_ZOMBIEACTOR);
goto BOLT; goto BOLT;
} }
} }
@ -7518,6 +7518,64 @@ static void G_MoveEffectors(void) //STATNUM 3
A_SetSprite(k,CLIPMASK0); A_SetSprite(k,CLIPMASK0);
} }
break; break;
#if 1 // POLYMER
case 49:
{
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = SECT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = SX;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = SY;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = SZ;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = SHT;
if ((sprite[i].xvel | sprite[i].yvel | sprite[i].zvel) != 0)
{
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = sprite[i].xvel;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = sprite[i].yvel;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = sprite[i].zvel;
}
else
{
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = hictinting[PL].r;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = hictinting[PL].g;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = hictinting[PL].b;
}
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 0;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = SA;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = SH;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = SS;
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
break;
}
case 50:
{
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = SECT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = SX;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = SY;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = SZ;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = SHT;
if ((sprite[i].xvel | sprite[i].yvel | sprite[i].zvel) != 0)
{
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = sprite[i].xvel;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = sprite[i].yvel;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = sprite[i].zvel;
}
else
{
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = hictinting[PL].r;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = hictinting[PL].g;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = hictinting[PL].b;
}
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = SA;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = SH;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = SS;
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
break;
}
#endif // POLYMER
} }
BOLT: BOLT:
i = nexti; i = nexti;

View file

@ -4876,7 +4876,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
if (!(sp->picnum == CAMERAPOLE || sp->picnum == GENERICPOLE)) if (!(sp->picnum == CAMERAPOLE || sp->picnum == GENERICPOLE))
{ {
sp->picnum = CAMERA1; sp->picnum = CAMERA1;
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
} }
} }
} }
@ -4916,15 +4916,15 @@ int32_t A_Spawn(int32_t j, int32_t pn)
{ {
if (sprite[j].picnum == RESPAWN) if (sprite[j].picnum == RESPAWN)
ActorExtra[i].tempang = sprite[i].pal = sprite[j].pal; ActorExtra[i].tempang = sprite[i].pal = sprite[j].pal;
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
} }
else changespritestat(i,2); else changespritestat(i, STAT_ZOMBIEACTOR);
} }
else else
{ {
sp->clipdist = 40; sp->clipdist = 40;
sp->owner = i; sp->owner = i;
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
} }
ActorExtra[i].timetosleep = 0; ActorExtra[i].timetosleep = 0;
@ -5074,7 +5074,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
if (j == -1) if (j == -1)
{ {
sp->cstat = (int16_t) 32768; sp->cstat = (int16_t) 32768;
changespritestat(i,2); changespritestat(i, STAT_ZOMBIEACTOR);
} }
else else
{ {
@ -5207,7 +5207,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
sp->extra = 20; sp->extra = 20;
sp->cstat |= 257; sp->cstat |= 257;
} }
changespritestat(i,2); changespritestat(i, STAT_ZOMBIEACTOR);
break; break;
case HYDRENT__STATIC: case HYDRENT__STATIC:
@ -5406,7 +5406,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
sp->clipdist = 32; sp->clipdist = 32;
} }
changespritestat(i,2); changespritestat(i, STAT_ZOMBIEACTOR);
break; break;
case DUKELYINGDEAD__STATIC: case DUKELYINGDEAD__STATIC:
@ -5444,7 +5444,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
sp->hitag = 0; sp->hitag = 0;
} }
case WEATHERWARN__STATIC: case WEATHERWARN__STATIC:
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
break; break;
case SPOTLITE__STATIC: case SPOTLITE__STATIC:
@ -5744,7 +5744,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
case LETTER__STATIC: case LETTER__STATIC:
sp->extra = 1; sp->extra = 1;
sp->cstat |= 257; sp->cstat |= 257;
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
break; break;
case OCTABRAINSTAYPUT__STATIC: case OCTABRAINSTAYPUT__STATIC:
case LIZTROOPSTAYPUT__STATIC: case LIZTROOPSTAYPUT__STATIC:
@ -5864,9 +5864,9 @@ int32_t A_Spawn(int32_t j, int32_t pn)
{ {
ActorExtra[i].timetosleep = 0; ActorExtra[i].timetosleep = 0;
A_PlayAlertSound(i); A_PlayAlertSound(i);
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
} }
else changespritestat(i,2); else changespritestat(i, STAT_ZOMBIEACTOR);
} }
if (sp->picnum == ROTATEGUN) if (sp->picnum == ROTATEGUN)
@ -5904,7 +5904,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
A_AddToDeleteQueue(i); A_AddToDeleteQueue(i);
} }
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
A_GetZLimits(i); A_GetZLimits(i);
@ -5944,7 +5944,8 @@ int32_t A_Spawn(int32_t j, int32_t pn)
} }
sp->extra = 130; sp->extra = 130;
CS |= 256; // Make it hitable CS |= 256; // Make it hitable
} else CS |= 257; }
else CS |= 257;
if (sp->picnum == REACTOR || sp->picnum == REACTOR2) if (sp->picnum == REACTOR || sp->picnum == REACTOR2)
sp->extra = g_impactDamage; sp->extra = g_impactDamage;
@ -5958,7 +5959,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
sp->pal = 0; sp->pal = 0;
SS = -17; SS = -17;
changespritestat(i,2); changespritestat(i, STAT_ZOMBIEACTOR);
break; break;
case ATOMICHEALTH__STATIC: case ATOMICHEALTH__STATIC:
@ -6036,10 +6037,10 @@ int32_t A_Spawn(int32_t j, int32_t pn)
sp->shade = -17; sp->shade = -17;
if (j >= 0) changespritestat(i,1); if (j >= 0) changespritestat(i, STAT_ACTOR);
else else
{ {
changespritestat(i,2); changespritestat(i, STAT_ZOMBIEACTOR);
A_Fall(i); A_Fall(i);
} }
break; break;
@ -6068,7 +6069,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
sp->xrepeat = sp->yrepeat = 24; sp->xrepeat = sp->yrepeat = 24;
sp->shade = -127; sp->shade = -127;
sp->extra = g_impactDamage<<2; sp->extra = g_impactDamage<<2;
changespritestat(i,2); changespritestat(i, STAT_ZOMBIEACTOR);
break; break;
case STEAM__STATIC: case STEAM__STATIC:
@ -6085,6 +6086,16 @@ int32_t A_Spawn(int32_t j, int32_t pn)
break; break;
case SECTOREFFECTOR__STATIC: case SECTOREFFECTOR__STATIC:
switch (sp->lotag)
{
case 49:
case 50:
changespritestat(i, STAT_EFFECTOR);
goto SPAWN_END;
break;
}
sp->yvel = sector[sect].extra; sp->yvel = sector[sect].extra;
sp->cstat |= 32768; sp->cstat |= 32768;
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
@ -6414,7 +6425,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
// Bsprintf(tempbuf,"Found lonely Sector Effector (lotag 0) at (%d,%d)\n",sp->x,sp->y); // Bsprintf(tempbuf,"Found lonely Sector Effector (lotag 0) at (%d,%d)\n",sp->x,sp->y);
// G_GameExit(tempbuf); // G_GameExit(tempbuf);
OSD_Printf(OSD_ERROR "Found lonely Sector Effector (lotag 0) at (%d,%d)\n",sp->x,sp->y); OSD_Printf(OSD_ERROR "Found lonely Sector Effector (lotag 0) at (%d,%d)\n",sp->x,sp->y);
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
if (apScriptGameEvent[EVENT_SPAWN]) if (apScriptGameEvent[EVENT_SPAWN])
{ {
int32_t pl=A_FindPlayer(&sprite[i],&p); int32_t pl=A_FindPlayer(&sprite[i],&p);
@ -6531,7 +6542,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
changespritestat(i,15); changespritestat(i,15);
break; break;
default: default:
changespritestat(i,3); changespritestat(i, STAT_EFFECTOR);
break; break;
} }
@ -6623,7 +6634,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
if (sp->picnum == EGG) if (sp->picnum == EGG)
sp->clipdist = 24; sp->clipdist = 24;
sp->cstat = 257|(krand()&4); sp->cstat = 257|(krand()&4);
changespritestat(i,2); changespritestat(i, STAT_ZOMBIEACTOR);
} }
break; break;
case TOILETWATER__STATIC: case TOILETWATER__STATIC:
@ -6632,6 +6643,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
break; break;
} }
SPAWN_END:
if (apScriptGameEvent[EVENT_SPAWN]) if (apScriptGameEvent[EVENT_SPAWN])
{ {
int32_t pl=A_FindPlayer(&sprite[i],&p); int32_t pl=A_FindPlayer(&sprite[i],&p);

View file

@ -987,64 +987,6 @@ static inline void prelevel(char g)
{ {
if (PN == SECTOREFFECTOR && SLT == 14) if (PN == SECTOREFFECTOR && SLT == 14)
continue; continue;
#if 1 // POLYMER
if (PN == SECTOREFFECTOR && SLT == 49)
{
staticlights[staticlightcount].sector = SECT;
staticlights[staticlightcount].x = SX;
staticlights[staticlightcount].y = SY;
staticlights[staticlightcount].z = SZ;
staticlights[staticlightcount].range = SHT;
if ((sprite[i].xvel | sprite[i].yvel | sprite[i].zvel) != 0)
{
staticlights[staticlightcount].color[0] = sprite[i].xvel;
staticlights[staticlightcount].color[1] = sprite[i].yvel;
staticlights[staticlightcount].color[2] = sprite[i].zvel;
}
else
{
staticlights[staticlightcount].color[0] = hictinting[PL].r;
staticlights[staticlightcount].color[1] = hictinting[PL].g;
staticlights[staticlightcount].color[2] = hictinting[PL].b;
}
staticlights[staticlightcount].radius = 0;
staticlights[staticlightcount].angle = SA;
staticlights[staticlightcount].horiz = SH;
staticlights[staticlightcount].priority = SS;
staticlightcount++;
deletesprite(i);
continue;
}
if (PN == SECTOREFFECTOR && SLT == 50)
{
staticlights[staticlightcount].sector = SECT;
staticlights[staticlightcount].x = SX;
staticlights[staticlightcount].y = SY;
staticlights[staticlightcount].z = SZ;
staticlights[staticlightcount].range = SHT;
if ((sprite[i].xvel | sprite[i].yvel | sprite[i].zvel) != 0)
{
staticlights[staticlightcount].color[0] = sprite[i].xvel;
staticlights[staticlightcount].color[1] = sprite[i].yvel;
staticlights[staticlightcount].color[2] = sprite[i].zvel;
}
else
{
staticlights[staticlightcount].color[0] = hictinting[PL].r;
staticlights[staticlightcount].color[1] = hictinting[PL].g;
staticlights[staticlightcount].color[2] = hictinting[PL].b;
}
staticlights[staticlightcount].radius = 256;
staticlights[staticlightcount].faderadius = 200;
staticlights[staticlightcount].angle = SA;
staticlights[staticlightcount].horiz = SH;
staticlights[staticlightcount].priority = SS;
staticlightcount++;
deletesprite(i);
continue;
}
#endif // POLYMER
A_Spawn(-1,i); A_Spawn(-1,i);
} }
} }

View file

@ -2364,7 +2364,7 @@ void A_DamageObject(int32_t i,int32_t sn)
if (sprite[i].statnum == 2) if (sprite[i].statnum == 2)
{ {
changespritestat(i,1); changespritestat(i, STAT_ACTOR);
ActorExtra[i].timetosleep = SLEEPTIME; ActorExtra[i].timetosleep = SLEEPTIME;
} }
if ((RX < 24 || PN == SHARK) && sprite[sn].picnum == SHRINKSPARK) return; if ((RX < 24 || PN == SHARK) && sprite[sn].picnum == SHRINKSPARK) return;