mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Exhumed: first batch of refactoring writes to spr.pos.
This commit is contained in:
parent
75ab0cf018
commit
4131451a1a
7 changed files with 20 additions and 41 deletions
|
@ -65,9 +65,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, int x, int y,
|
|||
if (pActor == nullptr) {
|
||||
pActor = insertActor(pSector, 500);
|
||||
}
|
||||
pActor->spr.pos.X = x;
|
||||
pActor->spr.pos.Y = y;
|
||||
pActor->spr.pos.Z = z;
|
||||
pActor->set_int_pos({ x, y, z });
|
||||
pActor->spr.cstat = 0;
|
||||
|
||||
if (nFlag & 4)
|
||||
|
@ -136,9 +134,7 @@ void AIAnim::Tick(RunListEvent* ev)
|
|||
|
||||
if (pIgniter)
|
||||
{
|
||||
pActor->spr.pos.X = pIgniter->spr.pos.X;
|
||||
pActor->spr.pos.Y = pIgniter->spr.pos.Y;
|
||||
pActor->spr.pos.Z = pIgniter->spr.pos.Z;
|
||||
pActor->set_int_pos(pIgniter->spr.pos);
|
||||
|
||||
if (pIgniter->sector() != pActor->sector())
|
||||
{
|
||||
|
|
|
@ -59,9 +59,7 @@ void BuildAnubis(DExhumedActor* ap, int x, int y, int z, sectortype* pSector, in
|
|||
nAngle = ap->spr.ang;
|
||||
}
|
||||
|
||||
ap->spr.pos.X = x;
|
||||
ap->spr.pos.Y = y;
|
||||
ap->spr.pos.Z = z;
|
||||
ap->set_int_pos({ x, y, z });
|
||||
ap->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
ap->spr.xoffset = 0;
|
||||
ap->spr.shade = -12;
|
||||
|
@ -399,9 +397,7 @@ void AIAnubis::Damage(RunListEvent* ev)
|
|||
{
|
||||
auto pDrumActor = insertActor(ap->sector(), kStatAnubisDrum);
|
||||
|
||||
pDrumActor->spr.pos.X = ap->spr.pos.X;
|
||||
pDrumActor->spr.pos.Y = ap->spr.pos.Y;
|
||||
pDrumActor->spr.pos.Z = pDrumActor->sector()->floorz;
|
||||
pDrumActor->set_int_pos({ ap->spr.pos.X, ap->spr.pos.Y, pDrumActor->sector()->floorz });
|
||||
pDrumActor->spr.xrepeat = 40;
|
||||
pDrumActor->spr.yrepeat = 40;
|
||||
pDrumActor->spr.shade = -64;
|
||||
|
@ -424,7 +420,7 @@ void AIAnubis::Damage(RunListEvent* ev)
|
|||
ap->spr.xvel = 0;
|
||||
ap->spr.yvel = 0;
|
||||
ap->spr.zvel = 0;
|
||||
ap->spr.pos.Z = ap->sector()->floorz;
|
||||
ap->set_int_z(ap->sector()->floorz);
|
||||
ap->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
ap->nHealth = 0;
|
||||
|
|
|
@ -42,7 +42,7 @@ DExhumedActor* BuildBubble(vec3_t pos, sectortype* pSector)
|
|||
|
||||
auto pActor = insertActor(pSector, 402);
|
||||
|
||||
pActor->spr.pos = pos;
|
||||
pActor->set_int_pos(pos);
|
||||
pActor->spr.cstat = 0;
|
||||
pActor->spr.shade = -32;
|
||||
pActor->spr.pal = 0;
|
||||
|
@ -87,7 +87,7 @@ void AIBubble::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
}
|
||||
|
||||
pActor->spr.pos.Z += pActor->spr.zvel;
|
||||
pActor->add_int_z(pActor->spr.zvel);
|
||||
|
||||
auto pSector = pActor->sector();
|
||||
|
||||
|
|
|
@ -353,7 +353,7 @@ int MoveBullet(int nBullet)
|
|||
pActor->spr.xrepeat = 40;
|
||||
pActor->spr.yrepeat = 40;
|
||||
pActor->spr.shade = 0;
|
||||
pActor->spr.pos.Z += 512;
|
||||
pActor->add_int_z(512);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -489,9 +489,7 @@ HITSPRITE:
|
|||
{
|
||||
if ((pHitSect->pBelow != nullptr && (pHitSect->pBelow->Flag & kSectUnderwater)) || pHitSect->Depth)
|
||||
{
|
||||
pActor->spr.pos.X = x2;
|
||||
pActor->spr.pos.Y = y2;
|
||||
pActor->spr.pos.Z = z2;
|
||||
pActor->set_int_pos({ x2, y2, z2 });
|
||||
BuildSplash(pActor, pHitSect);
|
||||
}
|
||||
else
|
||||
|
@ -519,9 +517,7 @@ HITSPRITE:
|
|||
}
|
||||
else
|
||||
{
|
||||
pActor->spr.pos.X = x2;
|
||||
pActor->spr.pos.Y = y2;
|
||||
pActor->spr.pos.Z = z2;
|
||||
pActor->set_int_pos({ x2, y2, z2 });
|
||||
|
||||
ChangeActorSect(pActor, pHitSect);
|
||||
}
|
||||
|
@ -609,9 +605,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
|
|||
nZOffset = -nHeight;
|
||||
}
|
||||
|
||||
pBulletActor->spr.pos.X = pActor->spr.pos.X;
|
||||
pBulletActor->spr.pos.Y = pActor->spr.pos.Y;
|
||||
pBulletActor->spr.pos.Z = pActor->spr.pos.Z;
|
||||
pBulletActor->set_int_pos(pActor->spr.pos);
|
||||
|
||||
Bullet *pBullet = &BulletList[nBullet];
|
||||
|
||||
|
@ -681,7 +675,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
|
|||
pBullet->nRunRec = runlist_AddRunRec(pBulletActor->spr.lotag - 1, nBullet, 0xB0000);
|
||||
pBullet->nRunRec2 = runlist_AddRunRec(NewRun, nBullet, 0xB0000);
|
||||
pBullet->nDoubleDamage = nDoubleDamage;
|
||||
pBulletActor->spr.pos.Z += nZOffset;
|
||||
pBulletActor->add_int_z(nZOffset);
|
||||
pBulletActor->backuppos();
|
||||
|
||||
int var_18 = 0;
|
||||
|
@ -692,7 +686,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
|
|||
{
|
||||
if (pSector->pAbove == nullptr)
|
||||
{
|
||||
pBulletActor->spr.pos.Z = pSector->ceilingz;
|
||||
pBulletActor->set_int_z(pSector->ceilingz);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,9 +47,7 @@ void BuildFishLimb(DExhumedActor* pActor, int anim)
|
|||
pChunkActor->nCount = anim + 40;
|
||||
pChunkActor->nFrame = RandomSize(3) % SeqSize[SeqOffsets[kSeqFish] + anim + 40];
|
||||
|
||||
pChunkActor->spr.pos.X = pActor->spr.pos.X;
|
||||
pChunkActor->spr.pos.Y = pActor->spr.pos.Y;
|
||||
pChunkActor->spr.pos.Z = pActor->spr.pos.Z;
|
||||
pChunkActor->set_int_pos(pActor->spr.pos);
|
||||
pChunkActor->spr.cstat = 0;
|
||||
pChunkActor->spr.shade = -12;
|
||||
pChunkActor->spr.pal = 0;
|
||||
|
@ -104,7 +102,7 @@ void AIFishLimb::Tick(RunListEvent* ev)
|
|||
|
||||
if (FloorZ <= pActor->spr.pos.Z)
|
||||
{
|
||||
pActor->spr.pos.Z += 256;
|
||||
pActor->add_int_z(256);
|
||||
|
||||
if ((pActor->spr.pos.Z - FloorZ) > 25600)
|
||||
{
|
||||
|
@ -155,9 +153,7 @@ void BuildFish(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
ChangeActorStat(pActor, 103);
|
||||
}
|
||||
|
||||
pActor->spr.pos.X = x;
|
||||
pActor->spr.pos.Y = y;
|
||||
pActor->spr.pos.Z = z;
|
||||
pActor->set_int_pos({ x, y, z });
|
||||
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
pActor->spr.shade = -12;
|
||||
pActor->spr.clipdist = 80;
|
||||
|
@ -430,9 +426,7 @@ void AIFish::Tick(RunListEvent* ev)
|
|||
if (!(pActor->sector()->Flag & kSectUnderwater))
|
||||
{
|
||||
ChangeActorSect(pActor, pSector);
|
||||
pActor->spr.pos.X = x;
|
||||
pActor->spr.pos.Y = y;
|
||||
pActor->spr.pos.Z = z;
|
||||
pActor->set_int_pos({ x, y, z });
|
||||
|
||||
IdleFish(pActor, 0);
|
||||
return;
|
||||
|
|
|
@ -749,9 +749,7 @@ void ExamineSprites(TArray<DExhumedActor*>& actors)
|
|||
{
|
||||
auto pActor = insertActor(initsectp, 0);
|
||||
|
||||
pActor->spr.pos.X = initx;
|
||||
pActor->spr.pos.Y = inity;
|
||||
pActor->spr.pos.Z = initz;
|
||||
pActor->set_int_pos({ initx, inity, initz });
|
||||
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
nNetStartSprite[nNetStartSprites] = pActor;
|
||||
nNetStartSprites++;
|
||||
|
|
|
@ -37,7 +37,8 @@ void GameInterface::WarpToCoords(int x, int y, int z, int ang, int horz)
|
|||
{
|
||||
Player *nPlayer = &PlayerList[nLocalPlayer];
|
||||
|
||||
nPlayer->pActor->opos = nPlayer->pActor->spr.pos = { x, y, z };
|
||||
nPlayer->pActor->set_int_pos({ x, y, z });
|
||||
nPlayer->pActor->opos = nPlayer->pActor->spr.pos;
|
||||
|
||||
if (ang != INT_MIN)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue