mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- getting rid of COVERinsertsprite, plus cleanup.
This commit is contained in:
parent
e2c5b33ae1
commit
6f0c477e85
7 changed files with 12 additions and 30 deletions
|
@ -938,8 +938,6 @@ int AutoBreakSprite(DSWActor* breakActor, short type)
|
|||
|
||||
if (!break_info)
|
||||
{
|
||||
//DSPRINTF(ds,"Break Info not found - sprite %d", bp - sprite);
|
||||
MONO_PRINT(ds);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -2123,7 +2123,6 @@ void SetSpikeActive(DSWActor*); // spike.c
|
|||
#define NTAG_SEARCH_HI 2
|
||||
#define NTAG_SEARCH_LO_HI 3
|
||||
|
||||
int COVERinsertsprite(short sectnum, short statnum); //returns (short)spritenum;
|
||||
DSWActor* InsertActor(int sectnum, int statnum);
|
||||
|
||||
void AudioUpdate(void); // stupid
|
||||
|
|
|
@ -55,11 +55,6 @@ SAVE save;
|
|||
bool FAF_DebugView = false;
|
||||
|
||||
DSWActor* InsertActor(int sectnum, int stat)
|
||||
{
|
||||
return &swActors[COVERinsertsprite(sectnum, stat)];
|
||||
}
|
||||
|
||||
int COVERinsertsprite(short sectnum, short stat)
|
||||
{
|
||||
short spnum;
|
||||
spnum = insertsprite(sectnum, stat);
|
||||
|
@ -82,7 +77,7 @@ int COVERinsertsprite(short sectnum, short stat)
|
|||
pSprite->hitag = 0;
|
||||
pSprite->extra = 0;
|
||||
|
||||
return spnum;
|
||||
return &swActors[spnum];
|
||||
}
|
||||
|
||||
bool FAF_Sector(short sectnum)
|
||||
|
|
|
@ -2764,15 +2764,12 @@ void SpriteSetup(void)
|
|||
|
||||
case SPRI_CLIMB_MARKER:
|
||||
{
|
||||
short ns;
|
||||
SPRITEp np;
|
||||
|
||||
// setup climb marker
|
||||
change_actor_stat(actor, STAT_CLIMB_MARKER);
|
||||
|
||||
// make a QUICK_LADDER sprite automatically
|
||||
ns = COVERinsertsprite(sp->sectnum, STAT_QUICK_LADDER);
|
||||
np = &sprite[ns];
|
||||
auto ns = InsertActor(sp->sectnum, STAT_QUICK_LADDER);
|
||||
auto np = &ns->s();
|
||||
|
||||
np->cstat = 0;
|
||||
np->extra = 0;
|
||||
|
|
|
@ -327,13 +327,10 @@ int
|
|||
TrackClonePoint(short SpriteNum)
|
||||
{
|
||||
SPRITEp sp = &sprite[SpriteNum], np;
|
||||
short New;
|
||||
|
||||
New = COVERinsertsprite(sp->sectnum, sp->statnum);
|
||||
auto actorNew = InsertActor(sp->sectnum, sp->statnum);
|
||||
|
||||
ASSERT(New != -1);
|
||||
|
||||
np = &sprite[New];
|
||||
np = &actorNew->s();
|
||||
|
||||
np->cstat = np->extra = 0;
|
||||
np->x = sp->x;
|
||||
|
@ -343,7 +340,7 @@ TrackClonePoint(short SpriteNum)
|
|||
np->lotag = sp->lotag;
|
||||
np->hitag = sp->hitag;
|
||||
|
||||
return New;
|
||||
return actorNew->GetSpriteIndex();
|
||||
}
|
||||
|
||||
void QuickJumpSetup(short stat, short lotag, short type)
|
||||
|
@ -1847,7 +1844,7 @@ PlayerPart:
|
|||
if (TEST(sop->flags, SOBJ_DONT_ROTATE))
|
||||
continue;
|
||||
|
||||
// IS part of a sector - sprite can do things based on the
|
||||
// IS part of a sector, sprite can do things based on the
|
||||
// current sector it is in
|
||||
if (TEST(wall[sector[sp->sectnum].wallptr].extra, WALLFX_LOOP_DONT_SPIN))
|
||||
continue;
|
||||
|
|
|
@ -12671,7 +12671,7 @@ int DoSerpRing(DSWActor* actor)
|
|||
DISTANCE(sp->x, sp->y, u->targetActor->s().x, u->targetActor->s().y, dist, a,b,c);
|
||||
|
||||
// if ((dist ok and random ok) OR very few skulls left)
|
||||
if ((dist < 18000 && (RANDOM_P2(2048<<5)>>5) < 16) || User[sp->owner]->Counter < 4)
|
||||
if ((dist < 18000 && (RANDOM_P2(2048<<5)>>5) < 16) || ou->Counter < 4)
|
||||
{
|
||||
int sectnum = sp->sectnum;
|
||||
updatesector(sp->x,sp->y,§num);
|
||||
|
@ -12836,7 +12836,7 @@ int InitSerpRing(DSWActor* actor)
|
|||
USER* u = actor->u();
|
||||
SPRITEp sp = &actor->s(), np;
|
||||
USERp nu;
|
||||
short ang, ang_diff, ang_start, missiles, New;
|
||||
short ang, ang_diff, ang_start, missiles;
|
||||
short max_missiles;
|
||||
|
||||
const int SERP_RING_DIST = 2800; // Was 3500
|
||||
|
@ -19886,10 +19886,10 @@ void QueueGeneric(DSWActor* actor, short pic)
|
|||
|
||||
#if 0
|
||||
int
|
||||
DoShellShrap(short SpriteNum)
|
||||
DoShellShrap(DSWActor* actor)
|
||||
{
|
||||
SPRITEp sp = &sprite[SpriteNum];
|
||||
USERp u = User[SpriteNum].Data();
|
||||
SPRITEp sp = &actor->s();
|
||||
USERp u = actor->u();
|
||||
|
||||
// If the shell doesn't fall in the allowable range, kill it.
|
||||
if (u->ShellNum < (ShellCount-MAXSHELLS))
|
||||
|
|
|
@ -790,7 +790,6 @@ void SpawnZombie(PLAYERp pp, DSWActor* weaponActor)
|
|||
np->pal = nu->spal = ownerActor->u()->spal;
|
||||
np->ang = RANDOM_P2(2048);
|
||||
SetupZombie(actorNew);
|
||||
//np->shade = sprite[pp->PlayerSprite].shade;
|
||||
np->shade = -10;
|
||||
SET(nu->Flags2, SPR2_DONT_TARGET_OWNER);
|
||||
SET(np->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||
|
@ -810,10 +809,8 @@ void SpawnZombie(PLAYERp pp, DSWActor* weaponActor)
|
|||
void SpawnZombie2(DSWActor* actor)
|
||||
{
|
||||
SPRITEp sp = &actor->s();
|
||||
short New;
|
||||
SPRITEp np;
|
||||
USERp nu;
|
||||
short owner;
|
||||
SECT_USERp sectu = SectUser[sp->sectnum].Data();
|
||||
SECTORp sectp = §or[sp->sectnum];
|
||||
|
||||
|
@ -848,7 +845,6 @@ void SpawnZombie2(DSWActor* actor)
|
|||
np->pal = nu->spal = ownerActor->u()->spal;
|
||||
np->ang = RANDOM_P2(2048);
|
||||
SetupZombie(actorNew);
|
||||
//np->shade = sprite[pp->PlayerSprite].shade;
|
||||
np->shade = -10;
|
||||
SET(nu->Flags2, SPR2_DONT_TARGET_OWNER);
|
||||
SET(np->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||
|
|
Loading…
Reference in a new issue