- quick replacements

This commit is contained in:
Christoph Oelckers 2021-11-22 23:16:21 +01:00
parent 109ff8c3cb
commit 2394420f48
7 changed files with 16 additions and 16 deletions

View file

@ -147,16 +147,16 @@ void AIAnim::Tick(RunListEvent* ev)
pSprite->y = pSpriteB->y;
pSprite->z = pSpriteB->z;
if (pSpriteB->sectnum != pSprite->sectnum)
if (pSpriteB->sector() != pSprite->sector())
{
if (!validSectorIndex(pSpriteB->sectnum))
if (!pSpriteB->sector())
{
DestroyAnim(pActor);
return;
}
else
{
ChangeActorSect(pActor, pSpriteB->sectnum);
ChangeActorSect(pActor, pSpriteB->sector());
}
}
@ -239,11 +239,11 @@ void BuildExplosion(DExhumedActor* pActor)
{
auto pSprite = &pActor->s();
int nSector = pSprite->sectnum;
auto pSector = pSprite->sector();
int edx = 36;
if (sector[nSector].Flag & kSectUnderwater)
if (pSector->Flag & kSectUnderwater)
{
edx = 75;
}

View file

@ -401,7 +401,7 @@ void AIAnubis::Damage(RunListEvent* ev)
{
if (nAction >= 6 && nAction <= 10)
{
auto pDrumActor = insertActor(sp->sectnum, kStatAnubisDrum);
auto pDrumActor = insertActor(sp->sector(), kStatAnubisDrum);
auto pDrumSprite = &pDrumActor->s();
pDrumSprite->x = sp->x;

View file

@ -588,12 +588,12 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
sBullet.nType = nType;
sBullet.nDoubleDamage = nDoubleDamage;
sBullet.pActor = insertActor(pSprite->sectnum, 200);
sBullet.pActor = insertActor(pSprite->sector(), 200);
sBullet.pActor->s().ang = nAngle;
int nHeight = GetActorHeight(pTarget);
assert(validSectorIndex(pTargetSprite->sectnum));
assert(pTargetSprite->sector());
BulletHitsSprite(&sBullet, pActor, pTarget, pTargetSprite->x, pTargetSprite->y, pTargetSprite->z - (nHeight >> 1), pTargetSprite->sectnum);
DeleteActor(sBullet.pActor);

View file

@ -44,7 +44,7 @@ void BuildFishLimb(DExhumedActor* pActor, int anim)
{
auto pSprite = &pActor->s();
auto pChunkActor = insertActor(pSprite->sectnum, 99);
auto pChunkActor = insertActor(pSprite->sector(), 99);
auto pSprite2 = &pChunkActor->s();
pChunkActor->nCount = anim + 40;

View file

@ -149,18 +149,18 @@ void ExplodeGrenade(DExhumedActor* pActor)
auto pGrenadeSprite = &pActor->s();
int nPlayer = pGrenadeSprite->owner;
int nGrenadeSect = pGrenadeSprite->sectnum;
auto pGrenadeSect = pGrenadeSprite->sector();
pActor->nFrame = 1;
if (sector[nGrenadeSect].Flag & kSectUnderwater)
if (pGrenadeSect->Flag & kSectUnderwater)
{
var_28 = 75;
var_20 = 60;
}
else
{
if (pGrenadeSprite->z < sector[nGrenadeSect].floorz)
if (pGrenadeSprite->z < pGrenadeSect->floorz)
{
var_20 = 200;
var_28 = 36;
@ -186,7 +186,7 @@ void ExplodeGrenade(DExhumedActor* pActor)
pGrenadeSprite->x = bcos(nAngle, -5) + pPlayerSprite->x;
pGrenadeSprite->y = bsin(nAngle, -5) + pPlayerSprite->y;
ChangeActorSect(pActor, pPlayerSprite->sectnum);
ChangeActorSect(pActor, pPlayerSprite->sector());
if (!PlayerList[nPlayer].invincibility) {
PlayerList[nPlayer].nHealth = 1;

View file

@ -1360,7 +1360,7 @@ int BuildFireBall(DExhumedActor* nSprite, int a, int b)
DExhumedActor* BuildSpark(DExhumedActor* pActor, int nVal)
{
auto pSprite = &pActor->s();
auto pSpark = insertActor(pSprite->sectnum, 0);
auto pSpark = insertActor(pSprite->sector(), 0);
auto spr = &pSpark->s();

View file

@ -1290,9 +1290,9 @@ sectdone:
pFloorSprite->x = pPlayerSprite->x;
pFloorSprite->y = pPlayerSprite->y;
if (pFloorSprite->sectnum != pPlayerSprite->sectnum)
if (pFloorSprite->sector() != pPlayerSprite->sector())
{
ChangeActorSect(pFloorActor, pPlayerSprite->sectnum);
ChangeActorSect(pFloorActor, pPlayerSprite->sector());
}
pFloorSprite->z = pPlayerSprite->sector()->floorz;