mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
- the rest of Blood's flags, part II
This commit is contained in:
parent
13186cec6d
commit
955996dddc
4 changed files with 26 additions and 26 deletions
|
@ -343,8 +343,8 @@ int HitScan(DBloodActor *actor, int z, int dx, int dy, int dz, unsigned int nMas
|
|||
gHitInfo.clearObj();
|
||||
int x = pSprite->x;
|
||||
int y = pSprite->y;
|
||||
int bakCstat = pSprite->cstat;
|
||||
pSprite->cstat &= ~256;
|
||||
auto bakCstat = pSprite->cstat;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
if (nRange)
|
||||
{
|
||||
hitscangoal.x = x + MulScale(nRange << 4, Cos(pSprite->ang), 30);
|
||||
|
@ -388,8 +388,8 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
int x1 = pSprite->x+MulScale(nOffset, Cos(pSprite->ang+512), 30);
|
||||
int y1 = pSprite->y+MulScale(nOffset, Sin(pSprite->ang+512), 30);
|
||||
int z1 = pSprite->z+nZOffset;
|
||||
int bakCstat = pSprite->cstat;
|
||||
pSprite->cstat &= ~256;
|
||||
auto bakCstat = pSprite->cstat;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
if (nRange)
|
||||
{
|
||||
hitscangoal.x = x1+MulScale(nRange<<4, Cos(pSprite->ang), 30);
|
||||
|
@ -445,8 +445,8 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
return 3;
|
||||
}
|
||||
}
|
||||
int bakCstat = pOther->cstat;
|
||||
pOther->cstat &= ~256;
|
||||
auto bakCstat = pOther->cstat;
|
||||
pOther->cstat &= ~CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
gHitInfo.clearObj();
|
||||
pos = gHitInfo.hitpos; // must make a copy!
|
||||
hitscan(pos, pOther->sector(), { dx, dy, dz << 4 }, gHitInfo, CLIPMASK1);
|
||||
|
@ -560,7 +560,7 @@ void GetZRange(DBloodActor *actor, int *ceilZ, Collision *ceilColl, int *floorZ,
|
|||
auto pSprite = &actor->s();
|
||||
Collision scratch;
|
||||
|
||||
int bakCstat = pSprite->cstat;
|
||||
auto bakCstat = pSprite->cstat;
|
||||
int32_t nTemp1;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
getzrange(pSprite->pos, pSprite->sector(), (int32_t*)ceilZ, *ceilColl, (int32_t*)floorZ, *floorColl, nDist, nMask);
|
||||
|
|
|
@ -268,27 +268,27 @@ void UpdateSprite(DBloodActor* actor, SEQFRAME* pFrame)
|
|||
if (pFrame->transparent)
|
||||
pSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
else
|
||||
pSprite->cstat &= ~2;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_TRANSLUCENT;
|
||||
if (pFrame->transparent2)
|
||||
pSprite->cstat |= CSTAT_SPRITE_TRANS_FLIP;
|
||||
else
|
||||
pSprite->cstat &= ~512;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_TRANS_FLIP;
|
||||
if (pFrame->blockable)
|
||||
pSprite->cstat |= CSTAT_SPRITE_BLOCK;
|
||||
else
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
|
||||
if (pFrame->hittable)
|
||||
pSprite->cstat |= 256;
|
||||
pSprite->cstat |= CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
else
|
||||
pSprite->cstat &= ~256;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
if (pFrame->invisible)
|
||||
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
else
|
||||
pSprite->cstat &= (unsigned short)~32768;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
if (pFrame->pushable)
|
||||
pSprite->cstat |= 4096;
|
||||
pSprite->cstat |= CSTAT_SPRITE_BLOOD_BIT1;
|
||||
else
|
||||
pSprite->cstat &= ~4096;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_BLOOD_BIT1;
|
||||
if (pFrame->smoke)
|
||||
pSprite->flags |= 256;
|
||||
else
|
||||
|
|
|
@ -346,7 +346,7 @@ void OperateSprite(DBloodActor* actor, EVENT event)
|
|||
break;
|
||||
case kCmdOn:
|
||||
pXSprite->state = 1;
|
||||
pSprite->cstat &= (unsigned short)~CSTAT_SPRITE_INVISIBLE;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
pSprite->cstat |= CSTAT_SPRITE_BLOCK;
|
||||
break;
|
||||
case kCmdToggle:
|
||||
|
@ -496,7 +496,7 @@ void OperateSprite(DBloodActor* actor, EVENT event)
|
|||
SetSpriteState(actor, 1);
|
||||
break;
|
||||
default:
|
||||
pSprite->cstat &= (unsigned short)~CSTAT_SPRITE_INVISIBLE;
|
||||
pSprite->cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
actExplodeSprite(actor);
|
||||
break;
|
||||
}
|
||||
|
@ -875,7 +875,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
|
|||
|
||||
x = actor->basePoint.x;
|
||||
y = actor->basePoint.y;
|
||||
if (pSprite->cstat&8192)
|
||||
if (pSprite->cstat & CSTAT_SPRITE_MOVE_FORWARD)
|
||||
{
|
||||
if (vbp)
|
||||
RotatePoint((int*)&x, (int*)&y, vbp, a4, a5);
|
||||
|
@ -884,7 +884,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
|
|||
pSprite->x = x+vc-a4;
|
||||
pSprite->y = y+v8-a5;
|
||||
}
|
||||
else if (pSprite->cstat&16384)
|
||||
else if (pSprite->cstat & CSTAT_SPRITE_MOVE_REVERSE)
|
||||
{
|
||||
if (vbp)
|
||||
RotatePoint((int*)& x, (int*)& y, -vbp, a4, a4);
|
||||
|
@ -929,7 +929,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR *pXSector, int a3, int a4)
|
|||
continue;
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
if (pSprite->cstat&8192)
|
||||
if (pSprite->cstat & CSTAT_SPRITE_MOVE_FORWARD)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
pSprite->z += pSector->floorz-oldZ;
|
||||
|
@ -956,7 +956,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR *pXSector, int a3, int a4)
|
|||
spritetype* pSprite = &actor->s();
|
||||
if (pSprite->statnum == kStatMarker || pSprite->statnum == kStatPathMarker)
|
||||
continue;
|
||||
if (pSprite->cstat&16384)
|
||||
if (pSprite->cstat & CSTAT_SPRITE_MOVE_REVERSE)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
pSprite->z += pSector->ceilingz-oldZ;
|
||||
|
@ -1068,7 +1068,7 @@ int VSpriteBusy(sectortype* pSector, unsigned int a2)
|
|||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
if (pSprite->cstat&8192)
|
||||
if (pSprite->cstat & CSTAT_SPRITE_MOVE_FORWARD)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
pSprite->z = actor->basePoint.z+MulScale(dz1, GetWaveValue(a2, nWave), 16);
|
||||
|
@ -1082,7 +1082,7 @@ int VSpriteBusy(sectortype* pSector, unsigned int a2)
|
|||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (pSprite->cstat & 16384)
|
||||
if (pSprite->cstat & CSTAT_SPRITE_MOVE_REVERSE)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
pSprite->z = actor->basePoint.z + MulScale(dz2, GetWaveValue(a2, nWave), 16);
|
||||
|
@ -1837,7 +1837,7 @@ void ProcessMotion(void)
|
|||
while (auto actor = it.Next())
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
if (pSprite->cstat&24576)
|
||||
if (pSprite->cstat & CSTAT_SPRITE_MOVE_MASK)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
pSprite->z += vdi;
|
||||
|
@ -2112,7 +2112,7 @@ void trInit(TArray<DBloodActor*>& actors)
|
|||
break;
|
||||
}
|
||||
if (pXSprite->Vector) pSprite->cstat |= CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
if (pXSprite->Push) pSprite->cstat |= 4096;
|
||||
if (pXSprite->Push) pSprite->cstat |= CSTAT_SPRITE_BLOOD_BIT1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2197,7 +2197,7 @@ void ActivateGenerator(DBloodActor* actor)
|
|||
void FireballTrapSeqCallback(int, DBloodActor* actor)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (pSprite->cstat&32)
|
||||
if (pSprite->cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)
|
||||
actFireMissile(actor, 0, 0, 0, 0, (pSprite->cstat & CSTAT_SPRITE_YFLIP) ? 0x4000 : -0x4000, kMissileFireball);
|
||||
else
|
||||
actFireMissile(actor, 0, 0, bcos(pSprite->ang), bsin(pSprite->ang), 0, kMissileFireball);
|
||||
|
|
|
@ -1730,7 +1730,7 @@ void AltFireLifeLeech(int , PLAYER *pPlayer)
|
|||
if (missile)
|
||||
{
|
||||
auto pMissile = &missile->s();
|
||||
pMissile->cstat |= 4096;
|
||||
pMissile->cstat |= CSTAT_SPRITE_BLOOD_BIT1;
|
||||
XSPRITE *pXSprite = &missile->x();
|
||||
pXSprite->Push = 1;
|
||||
pXSprite->Proximity = 1;
|
||||
|
|
Loading…
Reference in a new issue