mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
- over_sp/under_sp sectnums
This commit is contained in:
parent
302016956f
commit
732aa2023b
4 changed files with 19 additions and 26 deletions
|
@ -103,7 +103,6 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se
|
||||||
SP_TAG5(sp) = sp->sector()->ceilingpicnum;
|
SP_TAG5(sp) = sp->sector()->ceilingpicnum;
|
||||||
sp->sector()->ceilingpicnum = SP_TAG2(sp);
|
sp->sector()->ceilingpicnum = SP_TAG2(sp);
|
||||||
SP_TAG4(sp) = sp->sector()->ceilingstat;
|
SP_TAG4(sp) = sp->sector()->ceilingstat;
|
||||||
//SET(sp->sectnum].ceilingstat, ((int)SP_TAG7(sp))<<7);
|
|
||||||
SET(sp->sector()->ceilingstat, SP_TAG6(sp));
|
SET(sp->sector()->ceilingstat, SP_TAG6(sp));
|
||||||
RESET(sp->sector()->ceilingstat, CEILING_STAT_PLAX);
|
RESET(sp->sector()->ceilingstat, CEILING_STAT_PLAX);
|
||||||
}
|
}
|
||||||
|
@ -112,7 +111,6 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se
|
||||||
SP_TAG5(sp) = sp->sector()->floorpicnum;
|
SP_TAG5(sp) = sp->sector()->floorpicnum;
|
||||||
sp->sector()->floorpicnum = SP_TAG2(sp);
|
sp->sector()->floorpicnum = SP_TAG2(sp);
|
||||||
SP_TAG4(sp) = sp->sector()->floorstat;
|
SP_TAG4(sp) = sp->sector()->floorstat;
|
||||||
//SET(sp->sector()->floorstat, ((int)SP_TAG7(sp))<<7);
|
|
||||||
SET(sp->sector()->floorstat, SP_TAG6(sp));
|
SET(sp->sector()->floorstat, SP_TAG6(sp));
|
||||||
RESET(sp->sector()->floorstat, FLOOR_STAT_PLAX);
|
RESET(sp->sector()->floorstat, FLOOR_STAT_PLAX);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1719,8 +1719,7 @@ void UpdatePlayerUnderSprite(PLAYERp pp)
|
||||||
ASSERT(over_u);
|
ASSERT(over_u);
|
||||||
|
|
||||||
// dont bother spawning if you ain't really in the water
|
// dont bother spawning if you ain't really in the water
|
||||||
//water_level_z = sector[over_sp->sectnum].floorz - Z(pp->WadeDepth);
|
water_level_z = over_sp->sector()->floorz; // - Z(pp->WadeDepth);
|
||||||
water_level_z = sector[over_sp->sectnum].floorz; // - Z(pp->WadeDepth);
|
|
||||||
|
|
||||||
// if not below water
|
// if not below water
|
||||||
above_water = (SPRITEp_BOS(over_sp) <= water_level_z);
|
above_water = (SPRITEp_BOS(over_sp) <= water_level_z);
|
||||||
|
@ -4100,7 +4099,7 @@ void DoPlayerWarpToUnderwater(PLAYERp pp)
|
||||||
{
|
{
|
||||||
over_sp = &actor->s();
|
over_sp = &actor->s();
|
||||||
|
|
||||||
if (TEST(sector[over_sp->sectnum].extra, SECTFX_DIVE_AREA) &&
|
if (TEST(over_sp->sector()->extra, SECTFX_DIVE_AREA) &&
|
||||||
over_sp->sector()->hasU() &&
|
over_sp->sector()->hasU() &&
|
||||||
over_sp->sector()->number == sectu->number)
|
over_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -4118,7 +4117,7 @@ void DoPlayerWarpToUnderwater(PLAYERp pp)
|
||||||
{
|
{
|
||||||
under_sp = &actor->s();
|
under_sp = &actor->s();
|
||||||
|
|
||||||
if (TEST(sector[under_sp->sectnum].extra, SECTFX_UNDERWATER) &&
|
if (TEST(under_sp->sector()->extra, SECTFX_UNDERWATER) &&
|
||||||
under_sp->sector()->hasU() &&
|
under_sp->sector()->hasU() &&
|
||||||
under_sp->sector()->number == sectu->number)
|
under_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -4147,7 +4146,7 @@ void DoPlayerWarpToUnderwater(PLAYERp pp)
|
||||||
else
|
else
|
||||||
pp->cursectnum = over;
|
pp->cursectnum = over;
|
||||||
|
|
||||||
pp->posz = sector[under_sp->sectnum].ceilingz + Z(6);
|
pp->posz = under_sp->sector()->ceilingz + Z(6);
|
||||||
|
|
||||||
pp->oposx = pp->posx;
|
pp->oposx = pp->posx;
|
||||||
pp->oposy = pp->posy;
|
pp->oposy = pp->posy;
|
||||||
|
@ -4175,7 +4174,7 @@ void DoPlayerWarpToSurface(PLAYERp pp)
|
||||||
{
|
{
|
||||||
under_sp = &actor->s();
|
under_sp = &actor->s();
|
||||||
|
|
||||||
if (TEST(sector[under_sp->sectnum].extra, SECTFX_UNDERWATER) &&
|
if (TEST(under_sp->sector()->extra, SECTFX_UNDERWATER) &&
|
||||||
under_sp->sector()->hasU() &&
|
under_sp->sector()->hasU() &&
|
||||||
under_sp->sector()->number == sectu->number)
|
under_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -4193,7 +4192,7 @@ void DoPlayerWarpToSurface(PLAYERp pp)
|
||||||
{
|
{
|
||||||
over_sp = &actor->s();
|
over_sp = &actor->s();
|
||||||
|
|
||||||
if (TEST(sector[over_sp->sectnum].extra, SECTFX_DIVE_AREA) &&
|
if (TEST(over_sp->sector()->extra, SECTFX_DIVE_AREA) &&
|
||||||
over_sp->sector()->hasU() &&
|
over_sp->sector()->hasU() &&
|
||||||
over_sp->sector()->number == sectu->number)
|
over_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -4220,7 +4219,7 @@ void DoPlayerWarpToSurface(PLAYERp pp)
|
||||||
pp->cursectnum = over;
|
pp->cursectnum = over;
|
||||||
}
|
}
|
||||||
|
|
||||||
pp->posz = sector[over_sp->sectnum].floorz - Z(2);
|
pp->posz = over_sp->sector()->floorz - Z(2);
|
||||||
|
|
||||||
// set z range and wade depth so we know how high to set view
|
// set z range and wade depth so we know how high to set view
|
||||||
DoPlayerZrange(pp);
|
DoPlayerZrange(pp);
|
||||||
|
|
|
@ -17900,7 +17900,7 @@ bool WarpToUnderwater(int *sectnum, int *x, int *y, int *z)
|
||||||
{
|
{
|
||||||
over_sp = &itActor->s();
|
over_sp = &itActor->s();
|
||||||
|
|
||||||
if (TEST(sector[over_sp->sectnum].extra, SECTFX_DIVE_AREA) &&
|
if (TEST(over_sp->sector()->extra, SECTFX_DIVE_AREA) &&
|
||||||
over_sp->sector()->hasU() && sectu->hasU() &&
|
over_sp->sector()->hasU() && sectu->hasU() &&
|
||||||
over_sp->sector()->number == sectu->number)
|
over_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -17918,7 +17918,7 @@ bool WarpToUnderwater(int *sectnum, int *x, int *y, int *z)
|
||||||
{
|
{
|
||||||
under_sp = &itActor->s();
|
under_sp = &itActor->s();
|
||||||
|
|
||||||
if (TEST(sector[under_sp->sectnum].extra, SECTFX_UNDERWATER) &&
|
if (TEST(under_sp->sector()->extra, SECTFX_UNDERWATER) &&
|
||||||
under_sp->sector()->hasU() &&
|
under_sp->sector()->hasU() &&
|
||||||
under_sp->sector()->number == sectu->number)
|
under_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -17949,7 +17949,7 @@ bool WarpToUnderwater(int *sectnum, int *x, int *y, int *z)
|
||||||
*sectnum = under;
|
*sectnum = under;
|
||||||
}
|
}
|
||||||
|
|
||||||
*z = sector[under_sp->sectnum].ceilingz + Z(1);
|
*z = under_sp->sector()->ceilingz + Z(1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -17974,7 +17974,7 @@ bool WarpToSurface(int *sectnum, int *x, int *y, int *z)
|
||||||
{
|
{
|
||||||
under_sp = &itActor->s();
|
under_sp = &itActor->s();
|
||||||
|
|
||||||
if (TEST(sector[under_sp->sectnum].extra, SECTFX_UNDERWATER) &&
|
if (TEST(under_sp->sector()->extra, SECTFX_UNDERWATER) &&
|
||||||
under_sp->sector()->hasU() && sectu->hasU() &&
|
under_sp->sector()->hasU() && sectu->hasU() &&
|
||||||
under_sp->sector()->number == sectu->number)
|
under_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -17992,7 +17992,7 @@ bool WarpToSurface(int *sectnum, int *x, int *y, int *z)
|
||||||
{
|
{
|
||||||
over_sp = &itActor->s();
|
over_sp = &itActor->s();
|
||||||
|
|
||||||
if (TEST(sector[over_sp->sectnum].extra, SECTFX_DIVE_AREA) &&
|
if (TEST(over_sp->sector()->extra, SECTFX_DIVE_AREA) &&
|
||||||
over_sp->sector()->hasU() &&
|
over_sp->sector()->hasU() &&
|
||||||
over_sp->sector()->number == sectu->number)
|
over_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -18019,7 +18019,7 @@ bool WarpToSurface(int *sectnum, int *x, int *y, int *z)
|
||||||
*sectnum = over;
|
*sectnum = over;
|
||||||
}
|
}
|
||||||
|
|
||||||
*z = sector[over_sp->sectnum].floorz - Z(2);
|
*z = over_sp->sector()->floorz - Z(2);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -18046,7 +18046,7 @@ bool SpriteWarpToUnderwater(DSWActor* actor)
|
||||||
{
|
{
|
||||||
over_sp = &itActor->s();
|
over_sp = &itActor->s();
|
||||||
|
|
||||||
if (TEST(sector[over_sp->sectnum].extra, SECTFX_DIVE_AREA) &&
|
if (TEST(over_sp->sector()->extra, SECTFX_DIVE_AREA) &&
|
||||||
over_sp->sector()->hasU() &&
|
over_sp->sector()->hasU() &&
|
||||||
over_sp->sector()->number == sectu->number)
|
over_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -18064,7 +18064,7 @@ bool SpriteWarpToUnderwater(DSWActor* actor)
|
||||||
{
|
{
|
||||||
under_sp = &itActor->s();
|
under_sp = &itActor->s();
|
||||||
|
|
||||||
if (TEST(sector[under_sp->sectnum].extra, SECTFX_UNDERWATER) &&
|
if (TEST(under_sp->sector()->extra, SECTFX_UNDERWATER) &&
|
||||||
under_sp->sector()->hasU() &&
|
under_sp->sector()->hasU() &&
|
||||||
under_sp->sector()->number == sectu->number)
|
under_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -18095,8 +18095,7 @@ bool SpriteWarpToUnderwater(DSWActor* actor)
|
||||||
ChangeActorSect(actor, over);
|
ChangeActorSect(actor, over);
|
||||||
}
|
}
|
||||||
|
|
||||||
//sp->z = sector[under_sp->sectnum].ceilingz + Z(6);
|
sp->z = under_sp->sector()->ceilingz + u->ceiling_dist+Z(1);
|
||||||
sp->z = sector[under_sp->sectnum].ceilingz + u->ceiling_dist+Z(1);
|
|
||||||
|
|
||||||
sp->backuppos();
|
sp->backuppos();
|
||||||
|
|
||||||
|
@ -18124,7 +18123,7 @@ bool SpriteWarpToSurface(DSWActor* actor)
|
||||||
{
|
{
|
||||||
under_sp = &itActor->s();
|
under_sp = &itActor->s();
|
||||||
|
|
||||||
if (TEST(sector[under_sp->sectnum].extra, SECTFX_UNDERWATER) &&
|
if (TEST(under_sp->sector()->extra, SECTFX_UNDERWATER) &&
|
||||||
under_sp->sector()->hasU() &&
|
under_sp->sector()->hasU() &&
|
||||||
under_sp->sector()->number == sectu->number)
|
under_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -18146,7 +18145,7 @@ bool SpriteWarpToSurface(DSWActor* actor)
|
||||||
{
|
{
|
||||||
over_sp = &itActor->s();
|
over_sp = &itActor->s();
|
||||||
|
|
||||||
if (TEST(sector[over_sp->sectnum].extra, SECTFX_DIVE_AREA) &&
|
if (TEST(over_sp->sector()->extra, SECTFX_DIVE_AREA) &&
|
||||||
over_sp->sector()->hasU() &&
|
over_sp->sector()->hasU() &&
|
||||||
over_sp->sector()->number == sectu->number)
|
over_sp->sector()->number == sectu->number)
|
||||||
{
|
{
|
||||||
|
@ -18173,7 +18172,7 @@ bool SpriteWarpToSurface(DSWActor* actor)
|
||||||
ChangeActorSect(actor, over);
|
ChangeActorSect(actor, over);
|
||||||
}
|
}
|
||||||
|
|
||||||
sp->z = sector[over_sp->sectnum].floorz - Z(2);
|
sp->z = over_sp->sector()->floorz - Z(2);
|
||||||
|
|
||||||
// set z range and wade depth so we know how high to set view
|
// set z range and wade depth so we know how high to set view
|
||||||
DoActorZrange(actor);
|
DoActorZrange(actor);
|
||||||
|
|
|
@ -824,9 +824,6 @@ void SpawnZombie2(DSWActor* actor)
|
||||||
if (SectorIsUnderwaterArea(sp->sectnum))
|
if (SectorIsUnderwaterArea(sp->sectnum))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//if (FAF_ConnectArea(sp->sectnum))
|
|
||||||
// return(-1);
|
|
||||||
|
|
||||||
if (FAF_ConnectArea(sp->sectnum))
|
if (FAF_ConnectArea(sp->sectnum))
|
||||||
{
|
{
|
||||||
int sectnum = sp->sectnum;
|
int sectnum = sp->sectnum;
|
||||||
|
|
Loading…
Reference in a new issue