mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- deleted the pSprite definitions from last commit.
This commit is contained in:
parent
6b8ec17017
commit
5623832b17
9 changed files with 18 additions and 99 deletions
|
@ -13,11 +13,10 @@ void collectTSpritesForPortal(int x, int y, int i, int interpolation)
|
|||
BloodSectIterator it(nSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (pSprite == gView->pSprite)
|
||||
if (actor == gView->actor)
|
||||
continue;
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
int zCeil, zFloor;
|
||||
getzsofslopeptr(§or[nSector], actor->spr.pos.X, actor->spr.pos.Y, &zCeil, &zFloor);
|
||||
if (actor->spr.statnum == kStatDude && (top < zCeil || bottom > zFloor))
|
||||
|
|
|
@ -420,7 +420,6 @@ void evSend(EventObject& eob, int rxId, COMMAND_ID command)
|
|||
BloodStatIterator it(kStatThing);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.flags & 32)
|
||||
continue;
|
||||
if (actor->hasX())
|
||||
|
@ -438,7 +437,6 @@ void evSend(EventObject& eob, int rxId, COMMAND_ID command)
|
|||
BloodStatIterator it(kStatItem);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.flags & 32)
|
||||
continue;
|
||||
if (actor->hasX())
|
||||
|
|
|
@ -118,7 +118,6 @@ void CFX::destroy(DBloodActor* actor)
|
|||
void CFX::remove(DBloodActor* actor)
|
||||
{
|
||||
if (!actor) return;
|
||||
spritetype *pSprite = &actor->s();
|
||||
if (actor->hasX()) seqKill(actor);
|
||||
if (actor->spr.statnum != kStatFree)
|
||||
actPostSprite(actor, kStatFree);
|
||||
|
@ -162,7 +161,7 @@ DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, int x, int y, int
|
|||
destroy(iactor);
|
||||
}
|
||||
auto actor = actSpawnSprite(pSector, x, y, z, 1, 0);
|
||||
spritetype* pSprite = &actor->s();
|
||||
|
||||
actor->spr.type = nFx;
|
||||
actor->spr.picnum = pFX->picnum;
|
||||
actor->spr.cstat |= pFX->cstat;
|
||||
|
@ -194,7 +193,6 @@ void CFX::fxProcess(void)
|
|||
BloodStatIterator it(kStatFX);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
viewBackupSpriteLoc(actor);
|
||||
auto pSector = actor->spr.sector();
|
||||
assert(pSector);
|
||||
|
@ -255,7 +253,6 @@ void CFX::fxProcess(void)
|
|||
|
||||
void fxSpawnBlood(DBloodActor *actor, int )
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (!actor->spr.insector())
|
||||
return;
|
||||
auto pSector = actor->spr.sector();
|
||||
|
@ -276,7 +273,6 @@ void fxSpawnBlood(DBloodActor *actor, int )
|
|||
|
||||
void fxSpawnPodStuff(DBloodActor* actor, int )
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
if (!actor->spr.insector())
|
||||
return;
|
||||
auto pSector = actor->spr.sector();
|
||||
|
@ -301,7 +297,6 @@ void fxSpawnPodStuff(DBloodActor* actor, int )
|
|||
|
||||
void fxSpawnEjectingBrass(DBloodActor* actor, int z, int a3, int a4)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
int x = actor->spr.pos.X + MulScale(actor->spr.clipdist - 4, Cos(actor->spr.ang), 28);
|
||||
int y = actor->spr.pos.Y + MulScale(actor->spr.clipdist - 4, Sin(actor->spr.ang), 28);
|
||||
x += MulScale(a3, Cos(actor->spr.ang + 512), 30);
|
||||
|
@ -321,7 +316,6 @@ void fxSpawnEjectingBrass(DBloodActor* actor, int z, int a3, int a4)
|
|||
|
||||
void fxSpawnEjectingShell(DBloodActor* actor, int z, int a3, int a4)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
int x = actor->spr.pos.X + MulScale(actor->spr.clipdist - 4, Cos(actor->spr.ang), 28);
|
||||
int y = actor->spr.pos.Y + MulScale(actor->spr.clipdist - 4, Sin(actor->spr.ang), 28);
|
||||
x += MulScale(a3, Cos(actor->spr.ang + 512), 30);
|
||||
|
|
|
@ -104,8 +104,7 @@ bool FindSector(int nX, int nY, sectortype** pSector)
|
|||
|
||||
bool CheckProximity(DBloodActor *actor, int nX, int nY, int nZ, sectortype* pSector, int nDist)
|
||||
{
|
||||
assert(actor != NULL);
|
||||
auto pSprite = &actor->s();
|
||||
assert(actor != nullptr);
|
||||
int oX = abs(nX-actor->spr.pos.X)>>4;
|
||||
if (oX >= nDist) return 0;
|
||||
|
||||
|
@ -337,8 +336,7 @@ bool IntersectRay(int wx, int wy, int wdx, int wdy, int x1, int y1, int z1, int
|
|||
|
||||
int HitScan(DBloodActor *actor, int z, int dx, int dy, int dz, unsigned int nMask, int nRange)
|
||||
{
|
||||
assert(actor != NULL);
|
||||
auto pSprite = &actor->s();
|
||||
assert(actor != nullptr);
|
||||
assert(dx != 0 || dy != 0);
|
||||
gHitInfo.clearObj();
|
||||
int x = actor->spr.pos.X;
|
||||
|
@ -379,11 +377,9 @@ int HitScan(DBloodActor *actor, int z, int dx, int dy, int dz, unsigned int nMas
|
|||
|
||||
int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, int dz, int nRange, int ac)
|
||||
{
|
||||
assert(actor != NULL);
|
||||
auto pSprite = &actor->s();
|
||||
assert(actor != nullptr);
|
||||
|
||||
int nNum = 256;
|
||||
assert(pSprite != NULL);
|
||||
gHitInfo.clearObj();
|
||||
int x1 = actor->spr.pos.X+MulScale(nOffset, Cos(actor->spr.ang+512), 30);
|
||||
int y1 = actor->spr.pos.Y+MulScale(nOffset, Sin(actor->spr.ang+512), 30);
|
||||
|
@ -556,8 +552,7 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
|
||||
void GetZRange(DBloodActor *actor, int *ceilZ, Collision *ceilColl, int *floorZ, Collision *floorColl, int nDist, unsigned int nMask, unsigned int nClipParallax)
|
||||
{
|
||||
assert(actor != NULL);
|
||||
auto pSprite = &actor->s();
|
||||
assert(actor != nullptr);
|
||||
Collision scratch;
|
||||
|
||||
auto bakCstat = actor->spr.cstat;
|
||||
|
|
|
@ -265,7 +265,6 @@ int ChanceToCount(int a1, int a2)
|
|||
|
||||
void GibFX(DBloodActor* actor, GIBFX *pGFX, CGibPosition *pPos, CGibVelocity *pVel)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
auto pSector = actor->spr.sector();
|
||||
if (adult_lockout && gGameOptions.nGameType == 0 && pGFX->fxId == FX_13)
|
||||
return;
|
||||
|
@ -333,7 +332,6 @@ void GibFX(DBloodActor* actor, GIBFX *pGFX, CGibPosition *pPos, CGibVelocity *pV
|
|||
|
||||
void GibThing(DBloodActor* actor, GIBTHING *pGThing, CGibPosition *pPos, CGibVelocity *pVel)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (adult_lockout && gGameOptions.nGameType <= 0)
|
||||
switch (pGThing->type) {
|
||||
case kThingBloodBits:
|
||||
|
|
|
@ -343,7 +343,6 @@ static DBloodActor* nnExtSpawnDude(DBloodActor* sourceActor, DBloodActor* origin
|
|||
|
||||
bool nnExtIsImmune(DBloodActor* actor, int dmgType, int minScale)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
if (dmgType >= kDmgFall && dmgType < kDmgMax && actor->hasX() && actor->xspr.locked != 1)
|
||||
{
|
||||
if (actor->spr.type >= kThingBase && actor->spr.type < kThingMax)
|
||||
|
@ -369,7 +368,6 @@ bool nnExtIsImmune(DBloodActor* actor, int dmgType, int minScale)
|
|||
|
||||
bool nnExtEraseModernStuff(DBloodActor* actor)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
auto pXSprite = &actor->x();
|
||||
|
||||
bool erased = false;
|
||||
|
@ -525,7 +523,6 @@ void nnExtInitModernStuff(TArray<DBloodActor*>& actors)
|
|||
{
|
||||
if (!actor->exists() || !actor->hasX()) continue;
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
|
||||
switch (actor->spr.type) {
|
||||
case kModernRandomTX:
|
||||
|
@ -1422,7 +1419,6 @@ void sfxPlayVectorSound(DBloodActor* actor, int vectorId)
|
|||
|
||||
int getSpriteMassBySize(DBloodActor* actor)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
int mass = 0; int seqId = -1; int clipDist = actor->spr.clipdist;
|
||||
if (!actor->hasX())
|
||||
{
|
||||
|
@ -1586,7 +1582,6 @@ void debrisConcuss(DBloodActor* owneractor, int listIndex, int x, int y, int z,
|
|||
DBloodActor* actor = gPhysSpritesList[listIndex];
|
||||
if (actor != nullptr && actor->hasX())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
int dx = actor->spr.pos.X - x; int dy = actor->spr.pos.Y - y; int dz = (actor->spr.pos.Z - z) >> 4;
|
||||
dmg = scale(0x40000, dmg, 0x40000 + dx * dx + dy * dy + dz * dz);
|
||||
bool thing = (actor->spr.type >= kThingBase && actor->spr.type < kThingMax);
|
||||
|
@ -1621,10 +1616,8 @@ void debrisConcuss(DBloodActor* owneractor, int listIndex, int x, int y, int z,
|
|||
|
||||
void debrisBubble(DBloodActor* actor)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
for (unsigned int i = 0; i < 1 + Random(5); i++) {
|
||||
|
||||
int nDist = (actor->spr.xrepeat * (tileWidth(actor->spr.picnum) >> 1)) >> 2;
|
||||
|
@ -1655,7 +1648,6 @@ void debrisMove(int listIndex)
|
|||
{
|
||||
DBloodActor* actor = gPhysSpritesList[listIndex];
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
auto pSector = actor->spr.sector();
|
||||
|
||||
if (!actor->hasX() || !pSector)
|
||||
|
@ -1734,7 +1726,7 @@ void debrisMove(int listIndex)
|
|||
int ceilZ, floorZ;
|
||||
Collision ceilColl, floorColl;
|
||||
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, clipDist, CLIPMASK0, PARALLAXCLIP_CEILING | PARALLAXCLIP_FLOOR);
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
|
||||
if ((pXSprite->physAttr & kPhysDebrisSwim) && uwater)
|
||||
{
|
||||
|
@ -2988,7 +2980,6 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
|
|||
|
||||
void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
auto pSource = &sourceactor->s();
|
||||
auto pXSource = &sourceactor->x();
|
||||
|
||||
|
@ -3119,7 +3110,6 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
void useEffectGen(DBloodActor* sourceactor, DBloodActor* actor)
|
||||
{
|
||||
if (!actor) actor = sourceactor;
|
||||
auto pSprite = &actor->s();
|
||||
auto pSource = &sourceactor->s();
|
||||
auto pXSource = &sourceactor->x();
|
||||
|
||||
|
@ -3388,7 +3378,6 @@ void damageSprites(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
|
||||
|
||||
int health = 0;
|
||||
auto pSprite = &actor->s();
|
||||
auto pXSprite = &actor->x();
|
||||
auto pXSource = &sourceactor->x();
|
||||
|
||||
|
@ -4865,7 +4854,6 @@ void modernTypeTrigger(int destObjType, sectortype* destSect, walltype* destWall
|
|||
|
||||
DBloodActor* aiFightGetTargetInRange(DBloodActor* actor, int minDist, int maxDist, int data, int teamMode)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
|
@ -5125,8 +5113,6 @@ bool aiFightGetDudesForBattle(DBloodActor* actor)
|
|||
|
||||
void aiFightAlarmDudesInSight(DBloodActor* actor, int max)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
|
||||
BloodStatIterator it(kStatDude);
|
||||
|
@ -5424,7 +5410,6 @@ void useDudeSpawn(DBloodActor* pSource, DBloodActor* pActor)
|
|||
|
||||
bool modernTypeOperateSprite(DBloodActor* actor, EVENT& event)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
auto pXSprite = &actor->x();
|
||||
|
||||
if (event.cmd >= kCmdLock && event.cmd <= kCmdToggleLock)
|
||||
|
@ -6286,7 +6271,6 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
if (actor == nullptr) actor = sourceactor;
|
||||
XSPRITE* pXSource = &sourceactor->x();
|
||||
spritetype* pSource = &sourceactor->s();
|
||||
spritetype* pSprite = &actor->s();
|
||||
|
||||
int dx = 0, dy = 0, dz = 0;
|
||||
|
||||
|
@ -6463,7 +6447,6 @@ void useIncDecGen(DBloodActor* sourceactor, int objType, sectortype* destSect, w
|
|||
|
||||
void sprite2sectorSlope(DBloodActor* actor, sectortype* pSector, char rel, bool forcez)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
int slope = 0, z = 0;
|
||||
switch (rel) {
|
||||
default:
|
||||
|
@ -6478,7 +6461,7 @@ void sprite2sectorSlope(DBloodActor* actor, sectortype* pSector, char rel, bool
|
|||
break;
|
||||
}
|
||||
|
||||
spriteSetSlope(pSprite, slope);
|
||||
spriteSetSlope(&actor->spr, slope);
|
||||
if (forcez) actor->spr.pos.Z = z;
|
||||
}
|
||||
|
||||
|
@ -6720,8 +6703,6 @@ void useSectorLightChanger(DBloodActor* sourceactor, sectortype* pSector)
|
|||
|
||||
void useTargetChanger(DBloodActor* sourceactor, DBloodActor* actor)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
|
||||
if (!actor->IsDudeActor() || actor->spr.statnum != kStatDude)
|
||||
{
|
||||
switch (actor->spr.type) // can be dead dude turned in gib
|
||||
|
@ -7126,7 +7107,6 @@ void playerQavSceneDraw(PLAYER* pPlayer, int a2, double a3, double a4, int a5)
|
|||
|
||||
QAVSCENE* pQavScene = &gPlayerCtrl[pPlayer->nPlayer].qavScene;
|
||||
auto actor = pQavScene->initiator;
|
||||
spritetype* pSprite = &actor->s();
|
||||
|
||||
if (pQavScene->qavResrc != NULL)
|
||||
{
|
||||
|
@ -7482,7 +7462,6 @@ bool setDataValueOfObject(int objType, sectortype* sect, walltype* wal, DBloodAc
|
|||
|
||||
bool nnExtCanMove(DBloodActor* actor, DBloodActor* target, int nAngle, int nRange)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
int x = actor->spr.pos.X, y = actor->spr.pos.Y, z = actor->spr.pos.Z;
|
||||
auto pSector = actor->spr.sector();
|
||||
HitScan(actor, z, Cos(nAngle) >> 16, Sin(nAngle) >> 16, 0, CLIPMASK0, nRange);
|
||||
|
@ -7514,7 +7493,6 @@ bool nnExtCanMove(DBloodActor* actor, DBloodActor* target, int nAngle, int nRang
|
|||
|
||||
void nnExtAiSetDirection(DBloodActor* actor, int a3)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
|
||||
|
@ -7561,7 +7539,6 @@ void nnExtAiSetDirection(DBloodActor* actor, int a3)
|
|||
|
||||
void aiPatrolState(DBloodActor* actor, int state)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax && actor->hasX());
|
||||
assert(actor->GetTarget());
|
||||
|
||||
|
@ -7681,7 +7658,6 @@ DBloodActor* aiPatrolMarkerBusy(DBloodActor* except, DBloodActor* marker)
|
|||
|
||||
bool aiPatrolMarkerReached(DBloodActor* actor)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
|
||||
const DUDEINFO_EXTRA* pExtra = &gDudeInfoExtra[actor->spr.type - kDudeBase];
|
||||
|
@ -7772,7 +7748,6 @@ bool markerIsNode(DBloodActor* mark, bool back)
|
|||
|
||||
void aiPatrolSetMarker(DBloodActor* actor)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
auto pXSprite = &actor->x();
|
||||
auto targetactor = actor->GetTarget();
|
||||
|
||||
|
@ -7883,7 +7858,6 @@ void aiPatrolSetMarker(DBloodActor* actor)
|
|||
|
||||
void aiPatrolStop(DBloodActor* actor, DBloodActor* targetactor, bool alarm)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
if (actor->hasX())
|
||||
{
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
|
@ -7957,7 +7931,6 @@ void aiPatrolRandGoalAng(DBloodActor* actor)
|
|||
void aiPatrolTurn(DBloodActor* actor)
|
||||
{
|
||||
auto pXSprite = &actor->x();
|
||||
auto pSprite = &actor->s();
|
||||
|
||||
int nTurnRange = (getDudeInfo(actor->spr.type)->angSpeed << 1) >> 4;
|
||||
int nAng = ((pXSprite->goalAng + 1024 - actor->spr.ang) & 2047) - 1024;
|
||||
|
@ -7974,7 +7947,6 @@ void aiPatrolTurn(DBloodActor* actor)
|
|||
void aiPatrolMove(DBloodActor* actor)
|
||||
{
|
||||
auto pXSprite = &actor->x();
|
||||
auto pSprite = &actor->s();
|
||||
auto targetactor = actor->GetTarget();
|
||||
|
||||
if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax) || !targetactor)
|
||||
|
@ -8053,7 +8025,6 @@ void aiPatrolAlarmLite(DBloodActor* actor, DBloodActor* targetactor)
|
|||
if (!actor->hasX() || !actor->IsDudeActor())
|
||||
return;
|
||||
|
||||
spritetype* pSprite = &actor->s();
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pTarget = &targetactor->s();
|
||||
|
||||
|
@ -8104,7 +8075,6 @@ void aiPatrolAlarmFull(DBloodActor* actor, DBloodActor* targetactor, bool chain)
|
|||
if (!actor->hasX() || !actor->IsDudeActor())
|
||||
return;
|
||||
|
||||
spritetype* pSprite = &actor->s();
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pTarget = &targetactor->s();
|
||||
|
||||
|
@ -8189,7 +8159,6 @@ bool spritesTouching(DBloodActor *actor1, DBloodActor* actor2)
|
|||
|
||||
bool aiCanCrouch(DBloodActor* actor)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
if (actor->spr.type >= kDudeBase && actor->spr.type < kDudeVanillaMax)
|
||||
return (gDudeInfoExtra[actor->spr.type - kDudeBase].idlcseqofs >= 0 && gDudeInfoExtra[actor->spr.type - kDudeBase].mvecseqofs >= 0);
|
||||
else if (actor->spr.type == kDudeModernCustom || actor->spr.type == kDudeModernCustomBurning)
|
||||
|
@ -8229,7 +8198,6 @@ bool readyForCrit(DBloodActor* hunter, DBloodActor* victim)
|
|||
|
||||
DBloodActor* aiPatrolSearchTargets(DBloodActor* actor)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
|
||||
enum { kMaxPatrolFoundSounds = 256 }; // should be the maximum amount of sound channels the engine can play at the same time.
|
||||
|
@ -8620,7 +8588,6 @@ bool aiPatrolGetPathDir(DBloodActor* actor, DBloodActor* marker)
|
|||
void aiPatrolThink(DBloodActor* actor)
|
||||
{
|
||||
auto pXSprite = &actor->x();
|
||||
auto pSprite = &actor->s();
|
||||
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
|
||||
|
@ -9030,7 +8997,6 @@ void levelEndLevelCustom(int nLevel)
|
|||
void callbackUniMissileBurst(DBloodActor* actor, sectortype*) // 22
|
||||
{
|
||||
if (!actor) return;
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.statnum != kStatProjectile) return;
|
||||
int nAngle = getangle(actor->xvel, actor->yvel);
|
||||
int nRadius = 0x55555;
|
||||
|
@ -9102,11 +9068,10 @@ void callbackGenDudeUpdate(DBloodActor* actor, sectortype*) // 24
|
|||
|
||||
void clampSprite(DBloodActor* actor, int which)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
int zTop, zBot;
|
||||
if (actor->spr.insector())
|
||||
{
|
||||
GetSpriteExtents(pSprite, &zTop, &zBot);
|
||||
GetActorExtents(actor, &zTop, &zBot);
|
||||
if (which & 0x01)
|
||||
actor->spr.pos.Z += ClipHigh(getflorzofslopeptr(actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y) - zBot, 0);
|
||||
if (which & 0x02)
|
||||
|
|
|
@ -241,7 +241,6 @@ void UpdateMasked(walltype* pWall, SEQFRAME* pFrame)
|
|||
|
||||
void UpdateSprite(DBloodActor* actor, SEQFRAME* pFrame)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
assert(actor->hasX());
|
||||
if (actor->spr.flags & 2)
|
||||
{
|
||||
|
@ -349,7 +348,6 @@ void SEQINST::Update()
|
|||
|
||||
|
||||
// by NoOne: add surfaceSound trigger feature
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (!VanillaMode() && pSequence->frames[frameIndex].surfaceSound && actor->zvel == 0 && actor->xvel != 0) {
|
||||
|
||||
if (actor->spr.sector()->upperLink) break; // don't play surface sound for stacked sectors
|
||||
|
|
|
@ -50,7 +50,6 @@ unsigned int GetWaveValue(unsigned int nPhase, int nType)
|
|||
|
||||
bool SetSpriteState(DBloodActor* actor, int nState)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
auto pXSprite = &actor->x();
|
||||
if ((pXSprite->busy & 0xffff) == 0 && pXSprite->state == nState)
|
||||
return 0;
|
||||
|
@ -182,7 +181,6 @@ unsigned int GetSourceBusy(EVENT& a1)
|
|||
|
||||
void LifeLeechOperate(DBloodActor* actor, EVENT event)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
auto pXSprite = &actor->x();
|
||||
switch (event.cmd) {
|
||||
case kCmdSpritePush:
|
||||
|
@ -218,7 +216,7 @@ void LifeLeechOperate(DBloodActor* actor, EVENT event)
|
|||
if (pTarget->statnum == kStatDude && !(pTarget->flags&32) && target->hasX())
|
||||
{
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
int nType = pTarget->type-kDudeBase;
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(nType+kDudeBase);
|
||||
int z1 = (top-actor->spr.pos.Z)-256;
|
||||
|
@ -268,7 +266,6 @@ void ActivateGenerator(DBloodActor*);
|
|||
|
||||
void OperateSprite(DBloodActor* actor, EVENT event)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
auto pXSprite = &actor->x();
|
||||
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
|
@ -705,7 +702,6 @@ void SectorStartSound(sectortype* pSector, int nState)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
if (actor->spr.statnum == kStatDecoration && actor->spr.type == kSoundSector && actor->hasX())
|
||||
{
|
||||
XSPRITE *pXSprite = &actor->x();
|
||||
|
@ -728,7 +724,6 @@ void SectorEndSound(sectortype* pSector, int nState)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.statnum == kStatDecoration && actor->spr.type == kSoundSector && actor->hasX())
|
||||
{
|
||||
XSPRITE *pXSprite = &actor->x();
|
||||
|
@ -751,7 +746,6 @@ void PathSound(sectortype* pSector, int nSound)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.statnum == kStatDecoration && actor->spr.type == kSoundSector)
|
||||
sfxPlay3DSound(actor, nSound, 0, 0);
|
||||
}
|
||||
|
@ -860,7 +854,6 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
// allow to move markers by sector movements in game if flags 1 is added in editor.
|
||||
switch (actor->spr.statnum) {
|
||||
case kStatMarker:
|
||||
|
@ -896,7 +889,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
|
|||
else if (pXSector->Drag)
|
||||
{
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
int floorZ = getflorzofslopeptr(pSector, actor->spr.pos.X, actor->spr.pos.Y);
|
||||
if (!(actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) && floorZ <= bottom)
|
||||
{
|
||||
|
@ -924,11 +917,10 @@ void ZTranslateSector(sectortype* pSector, XSECTOR *pXSector, int a3, int a4)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.statnum == kStatMarker || actor->spr.statnum == kStatPathMarker)
|
||||
continue;
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (actor->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
|
@ -953,7 +945,6 @@ void ZTranslateSector(sectortype* pSector, XSECTOR *pXSector, int a3, int a4)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.statnum == kStatMarker || actor->spr.statnum == kStatPathMarker)
|
||||
continue;
|
||||
if (actor->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE)
|
||||
|
@ -973,11 +964,10 @@ DBloodActor* GetHighestSprite(sectortype* pSector, int nStatus, int *z)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.statnum == nStatus || nStatus == kStatFree)
|
||||
{
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (top-actor->spr.pos.Z > *z)
|
||||
{
|
||||
*z = top-actor->spr.pos.Z;
|
||||
|
@ -998,7 +988,6 @@ DBloodActor* GetCrushedSpriteExtents(sectortype* pSector, int *pzTop, int *pzBot
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.statnum == kStatDude || actor->spr.statnum == kStatThing)
|
||||
{
|
||||
int top, bottom;
|
||||
|
@ -1067,7 +1056,6 @@ int VSpriteBusy(sectortype* pSector, unsigned int a2)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
if (actor->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
|
@ -1081,7 +1069,6 @@ int VSpriteBusy(sectortype* pSector, unsigned int a2)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
|
@ -1364,7 +1351,6 @@ bool SectorContainsDudes(sectortype * pSector)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.statnum == kStatDude)
|
||||
return 1;
|
||||
}
|
||||
|
@ -1396,11 +1382,10 @@ void OperateTeleport(sectortype* pSector)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
if (actor->spr.statnum == kStatDude)
|
||||
{
|
||||
PLAYER *pPlayer;
|
||||
char bPlayer = IsPlayerSprite(pSprite);
|
||||
char bPlayer = actor->IsPlayerActor();
|
||||
if (bPlayer)
|
||||
pPlayer = &gPlayer[actor->spr.type-kDudePlayer1];
|
||||
else
|
||||
|
@ -1638,7 +1623,6 @@ void LinkSector(sectortype* pSector, EVENT event)
|
|||
|
||||
void LinkSprite(DBloodActor* actor, EVENT event)
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
auto pXSprite = &actor->x();
|
||||
int nBusy = GetSourceBusy(event);
|
||||
|
||||
|
@ -1785,7 +1769,6 @@ void trMessageWall(walltype* pWall, EVENT& event)
|
|||
|
||||
void trMessageSprite(DBloodActor* actor, EVENT event)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
auto pXSprite = &actor->x();
|
||||
if (actor->spr.statnum != kStatFree) {
|
||||
|
||||
|
@ -1832,7 +1815,6 @@ void ProcessMotion(void)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
if (actor->spr.cstat & CSTAT_SPRITE_MOVE_MASK)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
|
@ -1848,13 +1830,12 @@ void ProcessMotion(void)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
if (actor->spr.flags&2)
|
||||
actor->spr.flags |= 4;
|
||||
else
|
||||
{
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (bottom >= floorZ && (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
|
@ -1872,9 +1853,8 @@ void ProcessMotion(void)
|
|||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (top <= ceilZ && (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
|
@ -2057,7 +2037,6 @@ void trInit(TArray<DBloodActor*>& actors)
|
|||
|
||||
for (auto actor : actors)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
if (actor->spr.statnum < kStatFree && actor->hasX())
|
||||
{
|
||||
auto pXSprite = &actor->x();
|
||||
|
@ -2135,7 +2114,6 @@ void trTextOver(int nId)
|
|||
|
||||
void InitGenerator(DBloodActor* actor)
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
assert(actor->hasX());
|
||||
XSPRITE *pXSprite = &actor->x();
|
||||
switch (actor->spr.type) {
|
||||
|
@ -2150,7 +2128,6 @@ void InitGenerator(DBloodActor* actor)
|
|||
|
||||
void ActivateGenerator(DBloodActor* actor)
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
assert(actor->hasX());
|
||||
XSPRITE *pXSprite = &actor->x();
|
||||
switch (actor->spr.type) {
|
||||
|
@ -2191,7 +2168,6 @@ void ActivateGenerator(DBloodActor* actor)
|
|||
|
||||
void FireballTrapSeqCallback(int, DBloodActor* actor)
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)
|
||||
actFireMissile(actor, 0, 0, 0, 0, (actor->spr.cstat & CSTAT_SPRITE_YFLIP) ? 0x4000 : -0x4000, kMissileFireball);
|
||||
else
|
||||
|
@ -2202,7 +2178,6 @@ void FireballTrapSeqCallback(int, DBloodActor* actor)
|
|||
void MGunFireSeqCallback(int, DBloodActor* actor)
|
||||
{
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (pXSprite->data2 > 0 || pXSprite->data1 == 0)
|
||||
{
|
||||
if (pXSprite->data2 > 0)
|
||||
|
|
|
@ -66,7 +66,6 @@ void warpInit(TArray<DBloodActor*>& actors)
|
|||
for(auto actor : actors)
|
||||
{
|
||||
if (!actor->exists()) continue;
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (actor->hasX()) {
|
||||
XSPRITE *pXSprite = &actor->x();
|
||||
switch (actor->spr.type) {
|
||||
|
@ -166,7 +165,6 @@ void warpInit(TArray<DBloodActor*>& actors)
|
|||
auto actor = barrier_cast<DBloodActor*>(sect.upperLink);
|
||||
if (actor && actor->hasX())
|
||||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
XSPRITE *pXSprite = &actor->x();
|
||||
int nLink = pXSprite->data1;
|
||||
for(auto& sect: sector)
|
||||
|
@ -190,7 +188,6 @@ void warpInit(TArray<DBloodActor*>& actors)
|
|||
|
||||
int CheckLink(DBloodActor *actor)
|
||||
{
|
||||
auto pSprite = &actor->s();
|
||||
auto pSector = actor->spr.sector();
|
||||
auto aUpper = barrier_cast<DBloodActor*>(pSector->upperLink);
|
||||
auto aLower = barrier_cast<DBloodActor*>(pSector->lowerLink);
|
||||
|
|
Loading…
Reference in a new issue