mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 20:40:39 +00:00
- use sector accessor in spritetype.
This removes more than 1/3 of all sector[] references at once.
This commit is contained in:
parent
d39efeb1c2
commit
dcee283154
25 changed files with 166 additions and 166 deletions
|
@ -538,7 +538,7 @@ void aisearch(PLAYER& plr, DWHActor* actor, boolean fly) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, fly);
|
||||
|
@ -548,8 +548,8 @@ void aisearch(PLAYER& plr, DWHActor* actor, boolean fly) {
|
|||
|
||||
boolean checksector6(DWHActor* actor) {
|
||||
SPRITE& spr = actor->s();
|
||||
if (sector[spr.sectnum].floorz - (32 << 8) < sector[spr.sectnum].ceilingz) {
|
||||
if (sector[spr.sectnum].lotag == 6)
|
||||
if (spr.sector()->floorz - (32 << 8) < spr.sector()->ceilingz) {
|
||||
if (spr.sector()->lotag == 6)
|
||||
SetNewStatus(actor, DIE);
|
||||
else {
|
||||
DeleteActor(actor);
|
||||
|
@ -562,15 +562,15 @@ boolean checksector6(DWHActor* actor) {
|
|||
|
||||
int checkfluid(int i, Collision& florHit) {
|
||||
SPRITE& spr = sprite[i];
|
||||
if (isValidSector(spr.sectnum) && florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == WATER
|
||||
/* || sector[spr.sectnum].floorpicnum == LAVA2 */ || sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == SLIME || sector[spr.sectnum].floorpicnum == FLOORMIRROR
|
||||
if (isValidSector(spr.sectnum) && florHit.type == kHitSector && (spr.sector()->floorpicnum == WATER
|
||||
/* || spr.sector()->floorpicnum == LAVA2 */ || spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == SLIME || spr.sector()->floorpicnum == FLOORMIRROR
|
||||
/*
|
||||
* || sector[spr.sectnum].floorpicnum == LAVA1 ||
|
||||
* sector[spr.sectnum].floorpicnum == ANILAVA
|
||||
* || spr.sector()->floorpicnum == LAVA1 ||
|
||||
* spr.sector()->floorpicnum == ANILAVA
|
||||
*/)) {
|
||||
if (sector[spr.sectnum].floorpicnum == WATER || sector[spr.sectnum].floorpicnum == SLIME
|
||||
|| sector[spr.sectnum].floorpicnum == FLOORMIRROR) {
|
||||
if (spr.sector()->floorpicnum == WATER || spr.sector()->floorpicnum == SLIME
|
||||
|| spr.sector()->floorpicnum == FLOORMIRROR) {
|
||||
return TYPEWATER;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -49,7 +49,7 @@ static void chasedemon(PLAYER& plr, DWHActor* actor)
|
|||
}
|
||||
|
||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
checksector6(actor);
|
||||
|
@ -64,8 +64,8 @@ static void chasedemon(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
if (spr.z + (8 << 8) >= sector[osectnum].floorz) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
|
@ -172,7 +172,7 @@ static void fleedemon(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -45,7 +45,7 @@ static void chasedevil(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -154,7 +154,7 @@ static void fleedevil(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -52,7 +52,7 @@ static void chasedragon(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -93,7 +93,7 @@ static void fleedragon(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -349,9 +349,9 @@ static void firebreath(PLAYER& plr, int i, int a, int b, int c)
|
|||
spawned.x = spr.x;
|
||||
spawned.y = spr.y;
|
||||
if (c == LOW)
|
||||
spawned.z = sector[spr.sectnum].floorz - (32 << 8);
|
||||
spawned.z = spr.sector()->floorz - (32 << 8);
|
||||
else
|
||||
spawned.z = sector[spr.sectnum].floorz - (tileHeight(spr.picnum) << 7);
|
||||
spawned.z = spr.sector()->floorz - (tileHeight(spr.picnum) << 7);
|
||||
spawned.cstat = 0;
|
||||
spawned.picnum = MONSTERBALL;
|
||||
spawned.shade = -15;
|
||||
|
|
|
@ -45,7 +45,7 @@ static void chasefatwitch(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -196,7 +196,7 @@ static void fleefatwitch(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -261,7 +261,7 @@ static void throwspank(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
spawned.x = spr.x;
|
||||
spawned.y = spr.y;
|
||||
spawned.z = sector[spr.sectnum].floorz - ((tileHeight(spr.picnum) >> 1) << 8);
|
||||
spawned.z = spr.sector()->floorz - ((tileHeight(spr.picnum) >> 1) << 8);
|
||||
spawned.cstat = 0; // Hitscan does not hit other bullets
|
||||
spawned.picnum = FATSPANK;
|
||||
spawned.shade = -15;
|
||||
|
|
|
@ -55,7 +55,7 @@ static void chasefish(PLAYER& plr, DWHActor* actor)
|
|||
}
|
||||
|
||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -71,8 +71,8 @@ static void chasefish(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -89,7 +89,7 @@ static void attackfish(PLAYER& plr, DWHActor* actor)
|
|||
int i = actor->GetSpriteIndex();
|
||||
SPRITE& spr = actor->s();
|
||||
|
||||
spr.z = sector[spr.sectnum].floorz;
|
||||
spr.z = spr.sector()->floorz;
|
||||
|
||||
switch (checkfluid(i, zr_florHit)) {
|
||||
case TYPELAVA:
|
||||
|
@ -135,7 +135,7 @@ static void skirmishfish(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
|
|
@ -57,7 +57,7 @@ static void chasefred(PLAYER& plr, DWHActor* actor)
|
|||
}
|
||||
|
||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -73,8 +73,8 @@ static void chasefred(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -97,7 +97,7 @@ static void skirmishfred(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
@ -248,7 +248,7 @@ static void fleefred(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -63,7 +63,7 @@ static void chasegoblin(PLAYER& plr, DWHActor* actor)
|
|||
}
|
||||
|
||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -79,8 +79,8 @@ static void chasegoblin(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -186,7 +186,7 @@ static void fleegoblin(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -333,7 +333,7 @@ static void skirmishgoblin(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
|
|
@ -163,7 +163,7 @@ static void chasegonzo(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -179,8 +179,8 @@ static void chasegonzo(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -236,7 +236,7 @@ static void skirmishgonzo(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
@ -469,7 +469,7 @@ static void fleegonzo(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -807,7 +807,7 @@ void deaddude(short sn) {
|
|||
spawned.z = spr.z;
|
||||
spawned.cstat = 0;
|
||||
spawned.picnum = GONZOBSHDEAD;
|
||||
spawned.shade = sector[spr.sectnum].floorshade;
|
||||
spawned.shade = spr.sector()->floorshade;
|
||||
spawned.pal = 0;
|
||||
spawned.xrepeat = spr.xrepeat;
|
||||
spawned.yrepeat = spr.yrepeat;
|
||||
|
|
|
@ -95,7 +95,7 @@ static void chasegron(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -111,8 +111,8 @@ static void chasegron(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -165,7 +165,7 @@ static void skirmishgron(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
@ -361,7 +361,7 @@ static void fleegron(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -45,7 +45,7 @@ static void chaseguardian(PLAYER& plr, DWHActor* actor)
|
|||
}
|
||||
|
||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -64,8 +64,8 @@ static void chaseguardian(PLAYER& plr, DWHActor* actor)
|
|||
if (!isValidSector(spr.sectnum))
|
||||
return;
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -182,7 +182,7 @@ static void fleeguardian(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -64,7 +64,7 @@ static void chaseimp(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -80,8 +80,8 @@ static void chaseimp(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -222,7 +222,7 @@ static void fleeimp(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -296,7 +296,7 @@ static void skirmishimp(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
|
|
@ -55,7 +55,7 @@ static void chasejudy(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -209,7 +209,7 @@ static void fleejudy(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -45,7 +45,7 @@ static void chasekatie(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -188,7 +188,7 @@ static void fleekatie(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -67,7 +67,7 @@ static void chasekobold(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -83,8 +83,8 @@ static void chasekobold(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -190,7 +190,7 @@ static void fleekobold(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -316,7 +316,7 @@ static void skirmishkobold(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
|
|
@ -64,7 +64,7 @@ static void chaseminotaur(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -80,8 +80,8 @@ static void chaseminotaur(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -119,7 +119,7 @@ static void skirmishminotaur(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
@ -292,7 +292,7 @@ static void fleeminotaur(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -81,7 +81,7 @@ static void chasenewguy(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -97,8 +97,8 @@ static void chasenewguy(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -152,7 +152,7 @@ static void skirmishnewguy(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
@ -251,7 +251,7 @@ static void fleenewguy(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -64,7 +64,7 @@ static void fleerat(PLAYER& plr, DWHActor* actor)
|
|||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
|
||||
|
@ -80,9 +80,9 @@ static void fleerat(PLAYER& plr, DWHActor* actor)
|
|||
// break;
|
||||
// }
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA2
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA2
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
|
|
@ -64,7 +64,7 @@ static void chaseskeleton(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -80,8 +80,8 @@ static void chaseskeleton(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -171,7 +171,7 @@ static void fleeskeleton(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -320,7 +320,7 @@ static void skirmishskeleton(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
|
|
@ -42,7 +42,7 @@ static void chaseskully(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -195,7 +195,7 @@ static void fleeskully(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -64,7 +64,7 @@ static void chasespider(PLAYER& plr, DWHActor* actor)
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
spr.z = zr_florz;
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
@ -80,8 +80,8 @@ static void chasespider(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA2 || sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA2 || spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -119,7 +119,7 @@ static void skirmishspider(PLAYER& plr, DWHActor* actor)
|
|||
spr.ang = getangle(plr.x - spr.x, plr.y - spr.y);
|
||||
SetNewStatus(actor, FACE);
|
||||
}
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
processfluid(actor, zr_florHit, false);
|
||||
|
@ -255,7 +255,7 @@ static void fleespider(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -21,7 +21,7 @@ static void chasewillow(PLAYER& plr, DWHActor* actor)
|
|||
return;
|
||||
}
|
||||
else {
|
||||
//spr.z = sector[spr.sectnum].floorz - (32 << 8);
|
||||
//spr.z = spr.sector()->floorz - (32 << 8);
|
||||
int dax = (bcos(spr.ang) * TICSPERFRAME) << 3;
|
||||
int day = (bsin(spr.ang) * TICSPERFRAME) << 3;
|
||||
checksight(plr, actor);
|
||||
|
@ -40,7 +40,7 @@ static void chasewillow(PLAYER& plr, DWHActor* actor)
|
|||
}
|
||||
|
||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (spr.z > zr_florz)
|
||||
|
@ -61,8 +61,8 @@ static void chasewillow(PLAYER& plr, DWHActor* actor)
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||
if (zr_florHit.type == kHitSector && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1 || spr.sector()->floorpicnum == ANILAVA)) {
|
||||
spr.hitag--;
|
||||
if (spr.hitag < 0)
|
||||
SetNewStatus(actor, DIE);
|
||||
|
@ -200,7 +200,7 @@ static void fleewillow(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.lotag < 0)
|
||||
SetNewStatus(actor, FACE);
|
||||
|
||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||
if ((spr.sectnum != osectnum) && (spr.sector()->lotag == 10))
|
||||
warpsprite(actor);
|
||||
|
||||
if (checksector6(actor))
|
||||
|
|
|
@ -551,32 +551,32 @@ void animateobjs(PLAYER& plr) {
|
|||
|
||||
spr.z -= (TICSPERFRAME << 6);
|
||||
SetActorPos(actor, &spr.pos);
|
||||
if (spr.z <= sector[spr.sectnum].ceilingz + 32768) {
|
||||
if (spr.z <= spr.sector()->ceilingz + 32768) {
|
||||
soundEngine->StopSound(CHAN_CART);
|
||||
spritesound(S_CLUNK, &spr);
|
||||
ChangeActorStat(actor, 0);
|
||||
spr.lotag = 1820;
|
||||
spr.z = sector[spr.sectnum].ceilingz + 32768;
|
||||
spr.z = spr.sector()->ceilingz + 32768;
|
||||
}
|
||||
break;
|
||||
case 1811:
|
||||
|
||||
spr.z -= (TICSPERFRAME << 6);
|
||||
SetActorPos(actor, &spr.pos);
|
||||
if (spr.z <= sector[spr.sectnum].ceilingz + 65536) {
|
||||
if (spr.z <= spr.sector()->ceilingz + 65536) {
|
||||
ChangeActorStat(actor, 0);
|
||||
spr.lotag = 1810;
|
||||
spr.z = sector[spr.sectnum].ceilingz + 65536;
|
||||
spr.z = spr.sector()->ceilingz + 65536;
|
||||
}
|
||||
break;
|
||||
case 1801:
|
||||
|
||||
spr.z -= (TICSPERFRAME << 6);
|
||||
SetActorPos(actor, &spr.pos);
|
||||
if (spr.z <= sector[spr.sectnum].ceilingz + 65536) {
|
||||
if (spr.z <= spr.sector()->ceilingz + 65536) {
|
||||
ChangeActorStat(actor, 0);
|
||||
spr.lotag = 1800;
|
||||
spr.z = sector[spr.sectnum].ceilingz + 65536;
|
||||
spr.z = spr.sector()->ceilingz + 65536;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -597,22 +597,22 @@ void animateobjs(PLAYER& plr) {
|
|||
ironbarmove = TICSPERFRAME << 6;
|
||||
spr.z += ironbarmove;
|
||||
SetActorPos(actor, &spr.pos);
|
||||
if (spr.z >= (sector[spr.sectnum].floorz - 32768)) {
|
||||
if (spr.z >= (spr.sector()->floorz - 32768)) {
|
||||
soundEngine->StopSound(CHAN_CART);
|
||||
spritesound(S_CLUNK, &spr);
|
||||
ChangeActorStat(actor, 0);
|
||||
spr.lotag = 1821;
|
||||
spr.z = sector[spr.sectnum].floorz - 32768;
|
||||
spr.z = spr.sector()->floorz - 32768;
|
||||
}
|
||||
break;
|
||||
case 1810:
|
||||
ironbarmove = TICSPERFRAME << 6;
|
||||
spr.z += ironbarmove;
|
||||
SetActorPos(actor, &spr.pos);
|
||||
if (spr.z >= sector[spr.sectnum].floorz) {
|
||||
if (spr.z >= spr.sector()->floorz) {
|
||||
ChangeActorStat(actor, 0);
|
||||
spr.lotag = 1811;
|
||||
spr.z = sector[spr.sectnum].floorz;
|
||||
spr.z = spr.sector()->floorz;
|
||||
}
|
||||
break;
|
||||
case 1800:
|
||||
|
@ -620,10 +620,10 @@ void animateobjs(PLAYER& plr) {
|
|||
ironbarmove = TICSPERFRAME << 6;
|
||||
spr.z += ironbarmove;
|
||||
SetActorPos(actor, &spr.pos);
|
||||
if (spr.z >= sector[spr.sectnum].floorz) {
|
||||
if (spr.z >= spr.sector()->floorz) {
|
||||
ChangeActorStat(actor, 0);
|
||||
spr.lotag = 1801;
|
||||
spr.z = sector[spr.sectnum].floorz;
|
||||
spr.z = spr.sector()->floorz;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ void animateobjs(PLAYER& plr) {
|
|||
int i = actor->GetSpriteIndex();
|
||||
|
||||
spr.lotag -= TICSPERFRAME;
|
||||
spr.z = sector[spr.sectnum].floorz + (tileHeight(spr.picnum) << 8);
|
||||
spr.z = spr.sector()->floorz + (tileHeight(spr.picnum) << 8);
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (spr.lotag <= 0) {
|
||||
|
@ -681,10 +681,10 @@ void animateobjs(PLAYER& plr) {
|
|||
|
||||
spr.lotag -= TICSPERFRAME;
|
||||
|
||||
if (spr.z < sector[spr.sectnum].floorz)
|
||||
if (spr.z < spr.sector()->floorz)
|
||||
spr.z += (int) TICSPERFRAME << 8;
|
||||
if (spr.z > sector[spr.sectnum].floorz)
|
||||
spr.z = sector[spr.sectnum].floorz;
|
||||
if (spr.z > spr.sector()->floorz)
|
||||
spr.z = spr.sector()->floorz;
|
||||
|
||||
if (spr.lotag < 0) {
|
||||
switch (spr.picnum) {
|
||||
|
@ -728,7 +728,7 @@ void animateobjs(PLAYER& plr) {
|
|||
}
|
||||
|
||||
if (moveStat.type == kHitSector) {
|
||||
if (sector[spr.sectnum].floorpicnum == WATER) {
|
||||
if (spr.sector()->floorpicnum == WATER) {
|
||||
makemonstersplash(SPLASHAROO, i);
|
||||
}
|
||||
switch (spr.picnum) {
|
||||
|
@ -767,9 +767,9 @@ void animateobjs(PLAYER& plr) {
|
|||
|
||||
SetActorPos(actor, &spr.pos);
|
||||
|
||||
if (spr.z >= sector[spr.sectnum].floorz) {
|
||||
if (sector[spr.sectnum].floorpicnum == WATER
|
||||
|| sector[spr.sectnum].floorpicnum == FLOORMIRROR) {
|
||||
if (spr.z >= spr.sector()->floorz) {
|
||||
if (spr.sector()->floorpicnum == WATER
|
||||
|| spr.sector()->floorpicnum == FLOORMIRROR) {
|
||||
makemonstersplash(SPLASHAROO, i);
|
||||
}
|
||||
SetNewStatus(actor, BROKENVASE);
|
||||
|
@ -819,7 +819,7 @@ void animateobjs(PLAYER& plr) {
|
|||
if (spr.lotag < 0 || moveStat.type == kHitWall) {
|
||||
spr.lotag = 0;
|
||||
ChangeActorStat(actor, 0);
|
||||
if (spr.z < sector[spr.sectnum].floorz) {
|
||||
if (spr.z < spr.sector()->floorz) {
|
||||
spr.zvel += 256L;
|
||||
ChangeActorStat(actor, FALL);
|
||||
}
|
||||
|
@ -923,16 +923,16 @@ void animateobjs(PLAYER& plr) {
|
|||
trailingsmoke(actor,false);
|
||||
}
|
||||
spr.z += spr.zvel;
|
||||
if (spr.z < sector[spr.sectnum].ceilingz + (4 << 8)) {
|
||||
spr.z = sector[spr.sectnum].ceilingz + (4 << 8);
|
||||
if (spr.z < spr.sector()->ceilingz + (4 << 8)) {
|
||||
spr.z = spr.sector()->ceilingz + (4 << 8);
|
||||
spr.zvel = (short) -(spr.zvel >> 1);
|
||||
}
|
||||
if (spr.z > sector[spr.sectnum].floorz - (4 << 8)) {
|
||||
spr.z = sector[spr.sectnum].floorz - (4 << 8);
|
||||
if (sector[spr.sectnum].floorpicnum == WATER || sector[spr.sectnum].floorpicnum == SLIME
|
||||
|| sector[spr.sectnum].floorpicnum == FLOORMIRROR)
|
||||
if (spr.z > spr.sector()->floorz - (4 << 8)) {
|
||||
spr.z = spr.sector()->floorz - (4 << 8);
|
||||
if (spr.sector()->floorpicnum == WATER || spr.sector()->floorpicnum == SLIME
|
||||
|| spr.sector()->floorpicnum == FLOORMIRROR)
|
||||
if (spr.picnum == FISH)
|
||||
spr.z = sector[spr.sectnum].floorz;
|
||||
spr.z = spr.sector()->floorz;
|
||||
else {
|
||||
if (krand() % 100 > 60)
|
||||
makemonstersplash(SPLASHAROO, i);
|
||||
|
@ -1051,14 +1051,14 @@ void animateobjs(PLAYER& plr) {
|
|||
spr.lotag -= TICSPERFRAME;
|
||||
if (isBlades(spr.picnum)) {
|
||||
spr.z -= spr.zvel;
|
||||
if (spr.z < sector[spr.sectnum].ceilingz + (4 << 8)) {
|
||||
spr.z = sector[spr.sectnum].ceilingz + (4 << 8);
|
||||
if (spr.z < spr.sector()->ceilingz + (4 << 8)) {
|
||||
spr.z = spr.sector()->ceilingz + (4 << 8);
|
||||
spr.zvel = (short) -(spr.zvel >> 1);
|
||||
}
|
||||
if (spr.z > sector[spr.sectnum].floorz - (4 << 8)) {
|
||||
spr.z = sector[spr.sectnum].floorz - (4 << 8);
|
||||
if (sector[spr.sectnum].floorpicnum == WATER || sector[spr.sectnum].floorpicnum == SLIME
|
||||
|| sector[spr.sectnum].floorpicnum == FLOORMIRROR)
|
||||
if (spr.z > spr.sector()->floorz - (4 << 8)) {
|
||||
spr.z = spr.sector()->floorz - (4 << 8);
|
||||
if (spr.sector()->floorpicnum == WATER || spr.sector()->floorpicnum == SLIME
|
||||
|| spr.sector()->floorpicnum == FLOORMIRROR)
|
||||
if (krand() % 100 > 60)
|
||||
makemonstersplash(SPLASHAROO, i);
|
||||
DeleteActor(actor);
|
||||
|
@ -1092,8 +1092,8 @@ void animateobjs(PLAYER& plr) {
|
|||
// floor/ceiling hit rather than a sprite hit, we'll need to check if the JAVLIN
|
||||
// is
|
||||
// actually in the floor/ceiling before going inactive.
|
||||
if (spr.z <= sector[spr.sectnum].ceilingz
|
||||
&& spr.z >= sector[spr.sectnum].floorz) {
|
||||
if (spr.z <= spr.sector()->ceilingz
|
||||
&& spr.z >= spr.sector()->floorz) {
|
||||
if (spr.picnum == THROWPIKE) {
|
||||
spr.picnum++;
|
||||
spr.detail = WALLPIKETYPE;
|
||||
|
@ -1187,10 +1187,10 @@ void animateobjs(PLAYER& plr) {
|
|||
moveStat = movesprite(actor, xvel, yvel, daz, 4 << 8, 4 << 8, 1);
|
||||
|
||||
if (moveStat.type == kHitSector) {
|
||||
if (sector[spr.sectnum].floorpicnum == WATER || sector[spr.sectnum].floorpicnum == SLIME
|
||||
|| sector[spr.sectnum].floorpicnum == FLOORMIRROR) {
|
||||
if (spr.sector()->floorpicnum == WATER || spr.sector()->floorpicnum == SLIME
|
||||
|| spr.sector()->floorpicnum == FLOORMIRROR) {
|
||||
if (spr.picnum == FISH)
|
||||
spr.z = sector[spr.sectnum].floorz;
|
||||
spr.z = spr.sector()->floorz;
|
||||
else {
|
||||
if (krand() % 100 > 60)
|
||||
makemonstersplash(SPLASHAROO, i);
|
||||
|
@ -1199,7 +1199,7 @@ void animateobjs(PLAYER& plr) {
|
|||
} else {
|
||||
/* EG: Add check for parallax sky */
|
||||
if (spr.picnum >= BONECHUNK1 && spr.picnum <= BONECHUNKEND
|
||||
|| (daz >= zr_ceilz && (sector[spr.sectnum].ceilingstat & 1) != 0)) {
|
||||
|| (daz >= zr_ceilz && (spr.sector()->ceilingstat & 1) != 0)) {
|
||||
DeleteActor(actor);
|
||||
} else {
|
||||
spr.cstat |= 0x0020;
|
||||
|
@ -1228,7 +1228,7 @@ void animateobjs(PLAYER& plr) {
|
|||
|
||||
spr.lotag -= TICSPERFRAME;
|
||||
if (spr.lotag < 0) {
|
||||
if (spr.z < sector[spr.sectnum].floorz) {
|
||||
if (spr.z < spr.sector()->floorz) {
|
||||
spr.lotag = 600;
|
||||
spr.zvel = 0;
|
||||
SetNewStatus(actor, DRIP);
|
||||
|
@ -1315,12 +1315,12 @@ void animateobjs(PLAYER& plr) {
|
|||
|
||||
spr.zvel += (TICSPERFRAME << 4);
|
||||
|
||||
if (spr.z < sector[spr.sectnum].ceilingz + (4 << 8)) {
|
||||
spr.z = sector[spr.sectnum].ceilingz + (4 << 8);
|
||||
if (spr.z < spr.sector()->ceilingz + (4 << 8)) {
|
||||
spr.z = spr.sector()->ceilingz + (4 << 8);
|
||||
spr.zvel = (short) -(spr.zvel >> 1);
|
||||
}
|
||||
if (spr.z > sector[spr.sectnum].floorz - (4 << 8)) {
|
||||
spr.z = sector[spr.sectnum].floorz - (4 << 8);
|
||||
if (spr.z > spr.sector()->floorz - (4 << 8)) {
|
||||
spr.z = spr.sector()->floorz - (4 << 8);
|
||||
spr.zvel = (short) -(spr.zvel >> 1);
|
||||
}
|
||||
|
||||
|
@ -1458,12 +1458,12 @@ void animateobjs(PLAYER& plr) {
|
|||
|
||||
// spr.z+=spr.zvel;
|
||||
spr.zvel += (TICSPERFRAME << 5);
|
||||
if (spr.z < sector[spr.sectnum].ceilingz + (4 << 8)) {
|
||||
spr.z = sector[spr.sectnum].ceilingz + (4 << 8);
|
||||
if (spr.z < spr.sector()->ceilingz + (4 << 8)) {
|
||||
spr.z = spr.sector()->ceilingz + (4 << 8);
|
||||
spr.zvel = (short) -(spr.zvel >> 1);
|
||||
}
|
||||
if (spr.z > sector[spr.sectnum].floorz - (4 << 8) && spr.picnum != EXPLOSION) {
|
||||
spr.z = sector[spr.sectnum].floorz - (4 << 8);
|
||||
if (spr.z > spr.sector()->floorz - (4 << 8) && spr.picnum != EXPLOSION) {
|
||||
spr.z = spr.sector()->floorz - (4 << 8);
|
||||
spr.zvel = 0;
|
||||
spr.lotag = 4;
|
||||
}
|
||||
|
@ -1474,7 +1474,7 @@ void animateobjs(PLAYER& plr) {
|
|||
SetActorPos(actor, &spr.pos);
|
||||
}
|
||||
|
||||
if (spr.picnum == ICECUBE && spr.z < sector[spr.sectnum].floorz) {
|
||||
if (spr.picnum == ICECUBE && spr.z < spr.sector()->floorz) {
|
||||
spr.z += spr.zvel;
|
||||
|
||||
daz = spr.zvel += TICSPERFRAME << 4;
|
||||
|
@ -1492,15 +1492,15 @@ void animateobjs(PLAYER& plr) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (spr.z + (8 << 8) >= sector[spr.sectnum].floorz && spr.picnum == ICECUBE
|
||||
if (spr.z + (8 << 8) >= spr.sector()->floorz && spr.picnum == ICECUBE
|
||||
|| moveStat.type != kHitNone)
|
||||
{
|
||||
spr.z = sector[spr.sectnum].floorz;
|
||||
spr.z = spr.sector()->floorz;
|
||||
ChangeActorStat(actor, 0);
|
||||
if (sector[spr.sectnum].floorpicnum == WATER || sector[spr.sectnum].floorpicnum == SLIME
|
||||
|| sector[spr.sectnum].floorpicnum == FLOORMIRROR) {
|
||||
if (spr.sector()->floorpicnum == WATER || spr.sector()->floorpicnum == SLIME
|
||||
|| spr.sector()->floorpicnum == FLOORMIRROR) {
|
||||
if (spr.picnum == FISH)
|
||||
spr.z = sector[spr.sectnum].floorz;
|
||||
spr.z = spr.sector()->floorz;
|
||||
else {
|
||||
if (krand() % 100 > 60) {
|
||||
makemonstersplash(SPLASHAROO, i);
|
||||
|
|
|
@ -278,10 +278,10 @@ boolean prepareboard(const char* fname) {
|
|||
spr.cstat |= 0x8000;
|
||||
spr.clipdist = 4;
|
||||
ChangeActorStat(actor, 0);
|
||||
sector[spr.sectnum].lotag = 50;
|
||||
sector[spr.sectnum].hitag = spr.hitag;
|
||||
if (sector[spr.sectnum].hitag == 0)
|
||||
sector[spr.sectnum].hitag = 1;
|
||||
spr.sector()->lotag = 50;
|
||||
spr.sector()->hitag = spr.hitag;
|
||||
if (spr.sector()->hitag == 0)
|
||||
spr.sector()->hitag = 1;
|
||||
}
|
||||
|
||||
if ((spr.cstat & (16 + 32)) == (16 + 32))
|
||||
|
@ -311,17 +311,17 @@ boolean prepareboard(const char* fname) {
|
|||
}
|
||||
|
||||
if (spr.picnum == SNDEFFECT) {
|
||||
sector[spr.sectnum].extra = spr.lotag;
|
||||
spr.sector()->extra = spr.lotag;
|
||||
DeleteActor(actor);
|
||||
}
|
||||
|
||||
if (spr.picnum == SNDLOOP) { // loop on
|
||||
sector[spr.sectnum].extra = (short) (32768 | (spr.lotag << 1) | 1);
|
||||
spr.sector()->extra = (short) (32768 | (spr.lotag << 1) | 1);
|
||||
DeleteActor(actor);
|
||||
}
|
||||
|
||||
if (spr.picnum == SNDLOOPOFF) { // loop off
|
||||
sector[spr.sectnum].extra = (short) (32768 | (spr.lotag << 1));
|
||||
spr.sector()->extra = (short) (32768 | (spr.lotag << 1));
|
||||
DeleteActor(actor);
|
||||
}
|
||||
|
||||
|
|
|
@ -1350,16 +1350,16 @@ void newstatus(short sn, int seq) {
|
|||
spr.z = zr_florz;
|
||||
|
||||
if (zr_florHit.type == kHitSector) {
|
||||
if (spr.sectnum != MAXSECTORS && (sector[spr.sectnum].floorpicnum == WATER
|
||||
|| sector[spr.sectnum].floorpicnum == SLIME)) {
|
||||
if (spr.sectnum != MAXSECTORS && (spr.sector()->floorpicnum == WATER
|
||||
|| spr.sector()->floorpicnum == SLIME)) {
|
||||
if (spr.picnum == MINOTAURDEAD) {
|
||||
spr.z += (8 << 8);
|
||||
setsprite(sn, spr.x, spr.y, spr.z);
|
||||
}
|
||||
}
|
||||
if (spr.sectnum != MAXSECTORS && (sector[spr.sectnum].floorpicnum == LAVA
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA1
|
||||
|| sector[spr.sectnum].floorpicnum == LAVA2)) {
|
||||
if (spr.sectnum != MAXSECTORS && (spr.sector()->floorpicnum == LAVA
|
||||
|| spr.sector()->floorpicnum == LAVA1
|
||||
|| spr.sector()->floorpicnum == LAVA2)) {
|
||||
trailingsmoke(actor, true);
|
||||
DeleteActor(actor);
|
||||
}
|
||||
|
@ -1509,7 +1509,7 @@ void icecubes(int i, int x, int y, int z, int owner) {
|
|||
spawned.x = x;
|
||||
spawned.y = y;
|
||||
|
||||
spawned.z = sector[spr.sectnum].floorz - (getPlayerHeight() << 8) + (krand() & 4096);
|
||||
spawned.z = spr.sector()->floorz - (getPlayerHeight() << 8) + (krand() & 4096);
|
||||
|
||||
spawned.cstat = 0; // Hitscan does not hit smoke on wall
|
||||
spawned.picnum = ICECUBE;
|
||||
|
|
Loading…
Reference in a new issue