mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- lots of ->sectnum search & replace.
This commit is contained in:
parent
d1f156dec3
commit
e17da708e7
16 changed files with 46 additions and 49 deletions
|
@ -416,7 +416,7 @@ int DoActorDebris(DSWActor* actor)
|
|||
KillActor(actor);
|
||||
return 0;
|
||||
case ZILLA_RUN_R0:
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = sp->sector();
|
||||
u->hi_sectp = sp->sector();
|
||||
u->lowActor = nullptr;
|
||||
|
|
|
@ -1158,7 +1158,7 @@ void BunnyHatch(DSWActor* actor)
|
|||
auto actorNew = InsertActor(sp->sector(), STAT_DEFAULT);
|
||||
np = &actorNew->s();
|
||||
np->clear();
|
||||
np->sectnum = sp->sectnum;
|
||||
np->setsector(sp->sector());
|
||||
np->statnum = STAT_DEFAULT;
|
||||
np->x = sp->x;
|
||||
np->y = sp->y;
|
||||
|
@ -1223,7 +1223,7 @@ DSWActor* BunnyHatch2(DSWActor* actor)
|
|||
auto actorNew = InsertActor(wp->sector(), STAT_DEFAULT);
|
||||
auto np = &actorNew->s();
|
||||
np->clear();
|
||||
np->sectnum = wp->sectnum;
|
||||
np->setsector(wp->sector());
|
||||
np->statnum = STAT_DEFAULT;
|
||||
np->x = wp->x;
|
||||
np->y = wp->y;
|
||||
|
|
|
@ -493,7 +493,7 @@ void WarpCopySprite(spritetype* tsprite, int& spritesortcnt)
|
|||
newTSpr->x = sp2->x - xoff;
|
||||
newTSpr->y = sp2->y - yoff;
|
||||
newTSpr->z = sp2->z - zoff;
|
||||
newTSpr->sectnum = sp2->sectnum;
|
||||
newTSpr->setsector(sp2->sector());
|
||||
}
|
||||
|
||||
it.Reset(sect2);
|
||||
|
@ -617,7 +617,7 @@ void analyzesprites(spritetype* tsprite, int& spritesortcnt, int viewx, int view
|
|||
if (tsp->picnum == BETTY_R0 || tsp->picnum == FLOORBLOOD1)
|
||||
{
|
||||
auto sp = &tActor->s();
|
||||
int32_t const floorz = getflorzofslope(sp->sectnum, sp->x, sp->y);
|
||||
int32_t const floorz = getflorzofslopeptr(sp->sector(), sp->x, sp->y);
|
||||
if (sp->z > floorz)
|
||||
tsp->z = floorz;
|
||||
}
|
||||
|
|
|
@ -382,7 +382,7 @@ int DoBloodSpray(DSWActor* actor)
|
|||
// special stuff for blood worm
|
||||
sp->z += (u->zchange >> 1);
|
||||
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &cz, &fz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &cz, &fz);
|
||||
// pretend like we hit a sector
|
||||
if (sp->z >= fz)
|
||||
{
|
||||
|
|
|
@ -1287,7 +1287,7 @@ void DoPlayerTeleportToSprite(PLAYERp pp, vec3_t* sp, int ang)
|
|||
pp->posx = pp->oposx = pp->oldposx = sp->x;
|
||||
pp->posy = pp->oposy = pp->oldposy = sp->y;
|
||||
|
||||
//getzsofslope(sp->sectnum, pp->posx, pp->posy, &cz, &fz);
|
||||
//getzsofslopeptr(sp->sector(), pp->posx, pp->posy, &cz, &fz);
|
||||
//pp->posz = pp->oposz = fz - PLAYER_HEIGHT;
|
||||
|
||||
pp->posz = pp->oposz = sp->z - PLAYER_HEIGHT;
|
||||
|
|
|
@ -59,8 +59,7 @@ void CopyQuakeSpotToOn(SPRITEp sp)
|
|||
|
||||
memcpy(np, sp, sizeof(SPRITE));
|
||||
|
||||
np->sectnum = sp->sectnum;
|
||||
np->statnum = sp->statnum;
|
||||
np->setsector(sp->sector());
|
||||
|
||||
np->cstat = 0;
|
||||
np->extra = 0;
|
||||
|
|
|
@ -1221,7 +1221,7 @@ void RipperHatch(DSWActor* actor)
|
|||
np = &actorNew->s();
|
||||
np->clear();
|
||||
ClearOwner(actorNew);
|
||||
np->sectnum = wp->sectnum;
|
||||
np->setsector(wp->sector());
|
||||
np->statnum = STAT_DEFAULT;
|
||||
np->x = wp->x;
|
||||
np->y = wp->y;
|
||||
|
|
|
@ -1238,7 +1238,7 @@ void Ripper2Hatch(DSWActor* actor)
|
|||
np = &actorNew->s();
|
||||
np->clear();
|
||||
ClearOwner(actorNew);
|
||||
np->sectnum = wp->sectnum;
|
||||
np->setsector(wp->sector());
|
||||
np->statnum = STAT_DEFAULT;
|
||||
np->x = wp->x;
|
||||
np->y = wp->y;
|
||||
|
|
|
@ -908,7 +908,7 @@ void SectorExp(DSWActor* actor, short sectnum, short orig_ang, int zh)
|
|||
|
||||
// setup vars needed by SectorExp
|
||||
ChangeActorSect(actor, sectnum);
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &u->hiz, &u->loz);
|
||||
|
||||
// spawn explosion
|
||||
auto explosion = SpawnSectorExp(actor);
|
||||
|
|
|
@ -524,7 +524,7 @@ int DoSlidor(DSWActor* actor)
|
|||
USERp bu;
|
||||
bool found = false;
|
||||
|
||||
SWSectIterator it(sp->sectnum);
|
||||
SWSectIterator it(sp->sector());
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
bsp = &itActor->s();
|
||||
|
|
|
@ -98,9 +98,9 @@ void SetSpikeActive(DSWActor* actor)
|
|||
SECTORp sectp = sp->sector();
|
||||
|
||||
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
|
||||
StartInterpolation(sp->sectnum, Interp_Sect_Ceilingheinum);
|
||||
StartInterpolation(sp->sector(), Interp_Sect_Ceilingheinum);
|
||||
else
|
||||
StartInterpolation(sp->sectnum, Interp_Sect_Floorheinum);
|
||||
StartInterpolation(sp->sector(), Interp_Sect_Floorheinum);
|
||||
|
||||
InterpSectorSprites(sp->sectnum, true);
|
||||
|
||||
|
@ -126,9 +126,9 @@ void SetSpikeInactive(DSWActor* actor)
|
|||
SECTORp sectp = sp->sector();
|
||||
|
||||
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
|
||||
StopInterpolation(sp->sectnum, Interp_Sect_Ceilingheinum);
|
||||
StopInterpolation(sp->sector(), Interp_Sect_Ceilingheinum);
|
||||
else
|
||||
StopInterpolation(sp->sectnum, Interp_Sect_Floorheinum);
|
||||
StopInterpolation(sp->sector(), Interp_Sect_Floorheinum);
|
||||
|
||||
InterpSectorSprites(sp->sectnum, false);
|
||||
|
||||
|
@ -381,7 +381,7 @@ int DoSpike(DSWActor* actor)
|
|||
USERp bu;
|
||||
bool found = false;
|
||||
|
||||
SWSectIterator it(sp->sectnum);
|
||||
SWSectIterator it(sp->sector());
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
bsp = &actor->s();
|
||||
|
|
|
@ -1700,7 +1700,7 @@ void SpriteSetup(void)
|
|||
SPRITEp sp = &actor->s();
|
||||
|
||||
// not used yetv
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &cz, &fz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &cz, &fz);
|
||||
if (sp->z > DIV2(cz + fz))
|
||||
{
|
||||
// closer to a floor
|
||||
|
@ -1974,8 +1974,8 @@ void SpriteSetup(void)
|
|||
else
|
||||
sp->xvel = sp->lotag;
|
||||
|
||||
StartInterpolation(sp->sectnum, Interp_Sect_FloorPanX);
|
||||
StartInterpolation(sp->sectnum, Interp_Sect_FloorPanY);
|
||||
StartInterpolation(sp->sector(), Interp_Sect_FloorPanX);
|
||||
StartInterpolation(sp->sector(), Interp_Sect_FloorPanY);
|
||||
change_actor_stat(actor, STAT_FLOOR_PAN);
|
||||
break;
|
||||
}
|
||||
|
@ -1987,8 +1987,8 @@ void SpriteSetup(void)
|
|||
sp->xvel = 0;
|
||||
else
|
||||
sp->xvel = sp->lotag;
|
||||
StartInterpolation(sp->sectnum, Interp_Sect_CeilingPanX);
|
||||
StartInterpolation(sp->sectnum, Interp_Sect_CeilingPanY);
|
||||
StartInterpolation(sp->sector(), Interp_Sect_CeilingPanX);
|
||||
StartInterpolation(sp->sector(), Interp_Sect_CeilingPanY);
|
||||
change_actor_stat(actor, STAT_CEILING_PAN);
|
||||
break;
|
||||
}
|
||||
|
@ -3705,7 +3705,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
switch (u->ID)
|
||||
{
|
||||
case SAILORGIRL_R0:
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
ASSERT(sp->insector());
|
||||
actorNew = InsertActor(sp->sector(), STAT_SPAWN_ITEMS);
|
||||
np = &actorNew->s();
|
||||
np->cstat = np->extra = 0;
|
||||
|
@ -3746,7 +3746,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
if (RANDOM_P2(1024) < 700)
|
||||
return 0;
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
ASSERT(sp->insector());
|
||||
actorNew = InsertActor(sp->sector(), STAT_SPAWN_ITEMS);
|
||||
np = &actorNew->s();
|
||||
np->cstat = np->extra = 0;
|
||||
|
@ -3774,7 +3774,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
if (RANDOM_P2(1024) < 700)
|
||||
return 0;
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
ASSERT(sp->insector());
|
||||
actorNew = InsertActor(sp->sector(), STAT_SPAWN_ITEMS);
|
||||
np = &actorNew->s();
|
||||
np->cstat = np->extra = 0;
|
||||
|
@ -3805,7 +3805,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
if (RANDOM_P2(1024) > 200)
|
||||
return 0;
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
ASSERT(sp->insector());
|
||||
actorNew = InsertActor(sp->sector(), STAT_SPAWN_ITEMS);
|
||||
np = &actorNew->s();
|
||||
np->cstat = 0;
|
||||
|
@ -3868,7 +3868,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
if (RANDOM_P2(1024) < 512)
|
||||
return 0;
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
ASSERT(sp->insector());
|
||||
actorNew = InsertActor(sp->sector(), STAT_SPAWN_ITEMS);
|
||||
np = &actorNew->s();
|
||||
np->cstat = np->extra = 0;
|
||||
|
@ -3926,7 +3926,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
case PACHINKO3:
|
||||
case PACHINKO4:
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
ASSERT(sp->insector());
|
||||
actorNew = InsertActor(sp->sector(), STAT_SPAWN_ITEMS);
|
||||
np = &actorNew->s();
|
||||
np->cstat = np->extra = 0;
|
||||
|
@ -4876,7 +4876,7 @@ int move_actor(DSWActor* actor, int xchange, int ychange, int zchange)
|
|||
u->coll = move_sprite(actor, xchange, ychange, zchange,
|
||||
u->ceiling_dist, u->floor_dist, cliptype, ACTORMOVETICS);
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
ASSERT(sp->insector());
|
||||
|
||||
// try and determine whether you moved > lo_step in the z direction
|
||||
if (!TEST(u->Flags, SPR_NO_SCAREDZ | SPR_JUMPING | SPR_CLIMBING | SPR_FALLING | SPR_DEAD | SPR_SWIMMING))
|
||||
|
@ -6946,7 +6946,7 @@ Collision move_ground_missile(DSWActor* actor, int xchange, int ychange, int cei
|
|||
ChangeActorSect(actor, dasectnum);
|
||||
}
|
||||
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &u->hiz, &u->loz);
|
||||
|
||||
u->hi_sectp = u->lo_sectp = sp->sector();
|
||||
u->highActor = nullptr; u->lowActor = nullptr;
|
||||
|
|
|
@ -103,9 +103,9 @@ void SetVatorActive(DSWActor* actor)
|
|||
SECTORp sectp = sp->sector();
|
||||
|
||||
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
|
||||
StartInterpolation(sp->sectnum, Interp_Sect_Ceilingz);
|
||||
StartInterpolation(sp->sector(), Interp_Sect_Ceilingz);
|
||||
else
|
||||
StartInterpolation(sp->sectnum, Interp_Sect_Floorz);
|
||||
StartInterpolation(sp->sector(), Interp_Sect_Floorz);
|
||||
|
||||
InterpSectorSprites(sp->sectnum, true);
|
||||
|
||||
|
@ -131,9 +131,9 @@ void SetVatorInactive(DSWActor* actor)
|
|||
SECTORp sectp = sp->sector();
|
||||
|
||||
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
|
||||
StopInterpolation(sp->sectnum, Interp_Sect_Ceilingz);
|
||||
StopInterpolation(sp->sector(), Interp_Sect_Ceilingz);
|
||||
else
|
||||
StopInterpolation(sp->sectnum, Interp_Sect_Floorz);
|
||||
StopInterpolation(sp->sector(), Interp_Sect_Floorz);
|
||||
|
||||
InterpSectorSprites(sp->sectnum, false);
|
||||
|
||||
|
@ -492,7 +492,7 @@ int DoVator(DSWActor* actor)
|
|||
USERp bu;
|
||||
bool found = false;
|
||||
|
||||
SWSectIterator it(sp->sectnum);
|
||||
SWSectIterator it(sp->sector());
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
bsp = &itActor->s();
|
||||
|
@ -543,7 +543,7 @@ int DoVator(DSWActor* actor)
|
|||
{
|
||||
SPRITEp bsp;
|
||||
|
||||
SWSectIterator it(sp->sectnum);
|
||||
SWSectIterator it(sp->sector());
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
bsp = &itActor->s();
|
||||
|
|
|
@ -135,10 +135,10 @@ void SpawnVis(DSWActor* parentActor, short sectnum, int x, int y, int z, int amt
|
|||
auto psp = &parentActor->s();
|
||||
auto pu = parentActor->u();
|
||||
|
||||
if (sector[psp->sectnum].floorpal == PALETTE_FOG)
|
||||
if (psp->sector()->floorpal == PALETTE_FOG)
|
||||
return;
|
||||
|
||||
if (sector[psp->sectnum].floorpal == PALETTE_DIVE_LAVA)
|
||||
if (psp->sector()->floorpal == PALETTE_DIVE_LAVA)
|
||||
return;
|
||||
|
||||
// kill any others with the same parent
|
||||
|
@ -151,7 +151,7 @@ void SpawnVis(DSWActor* parentActor, short sectnum, int x, int y, int z, int amt
|
|||
}
|
||||
}
|
||||
|
||||
auto actorNew = InsertActor(psp->sectnum, STAT_VIS_ON);
|
||||
auto actorNew = InsertActor(psp->sector(), STAT_VIS_ON);
|
||||
sp = &actorNew->s();
|
||||
SetOwner(parentActor, actorNew);
|
||||
|
||||
|
|
|
@ -11802,9 +11802,9 @@ int DoRing(DSWActor* actor)
|
|||
|
||||
SetActor(actor, &sp->pos);
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
ASSERT(sp->insector());
|
||||
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &cz, &fz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &cz, &fz);
|
||||
|
||||
// bound the sprite by the sectors ceiling and floor
|
||||
if (sp->z > fz)
|
||||
|
@ -11941,9 +11941,9 @@ int DoSerpRing(DSWActor* actor)
|
|||
|
||||
SetActor(actor, &sp->pos);
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
ASSERT(sp->insector());
|
||||
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &cz, &fz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &cz, &fz);
|
||||
|
||||
// bound the sprite by the sectors ceiling and floor
|
||||
if (sp->z > fz)
|
||||
|
|
|
@ -681,16 +681,14 @@ int NullZilla(DSWActor* actor)
|
|||
#if 0
|
||||
if (u->State == s_ZillaDie)
|
||||
{
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = sp->sector();
|
||||
u->hi_sectp = sp->sector();
|
||||
sp->z = u->loz;
|
||||
}
|
||||
#endif
|
||||
|
||||
//if (!TEST(u->Flags,SPR_CLIMBING))
|
||||
// KeepActorOnFloor(actor);
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = sp->sector();
|
||||
u->hi_sectp = sp->sector();
|
||||
u->lowActor = nullptr;
|
||||
|
@ -764,7 +762,7 @@ int DoZillaDeathMelt(DSWActor* actor)
|
|||
}
|
||||
|
||||
//KeepActorOnFloor(actor);
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
|
||||
getzsofslopeptr(sp->sector(), sp->x, sp->y, &u->hiz, &u->loz);
|
||||
u->lo_sectp = sp->sector();
|
||||
u->hi_sectp = sp->sector();
|
||||
u->lowActor = nullptr;
|
||||
|
|
Loading…
Reference in a new issue