mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- eliminated spritetype::index.
# Conflicts: # source/games/sw/src/swactor.h
This commit is contained in:
parent
fa48b740c0
commit
47e207f158
5 changed files with 9 additions and 15 deletions
|
@ -266,13 +266,11 @@ struct spritetype
|
|||
int8_t xoffset, yoffset;
|
||||
int16_t sectnum, statnum;
|
||||
int16_t oang, ang, owner;
|
||||
union {
|
||||
int16_t xvel, index;
|
||||
};
|
||||
int16_t yvel;
|
||||
union {
|
||||
int16_t zvel, inittype;
|
||||
};
|
||||
int16_t xvel;
|
||||
int16_t yvel;
|
||||
union {
|
||||
int16_t zvel, inittype;
|
||||
};
|
||||
union {
|
||||
int16_t lotag, type;
|
||||
};
|
||||
|
|
|
@ -35,7 +35,6 @@ void collectTSpritesForPortal(int x, int y, int i, int interpolation)
|
|||
tspritetype* pTSprite = &pm_tsprite[pm_spritesortcnt++];
|
||||
*pTSprite = {};
|
||||
pTSprite->type = pSprite->type;
|
||||
pTSprite->index = pSprite->index;
|
||||
pTSprite->sectnum = nSector2;
|
||||
pTSprite->x = pSprite->x + dx;
|
||||
pTSprite->y = pSprite->y + dy;
|
||||
|
|
|
@ -165,7 +165,6 @@ void qinitspritelists(void) // Replace
|
|||
for (int i = 0; i < kMaxSprites; i++)
|
||||
{
|
||||
sprite[i].sectnum = -1;
|
||||
sprite[i].index = -1;
|
||||
InsertSpriteStat(i, kMaxStatus);
|
||||
}
|
||||
memset(gStatCount, 0, sizeof(gStatCount));
|
||||
|
@ -192,7 +191,6 @@ DBloodActor* InsertSprite(int nSector, int nStat)
|
|||
pSprite->clipdist = 32;
|
||||
pSprite->xrepeat = pSprite->yrepeat = 64;
|
||||
actor->SetOwner(nullptr);
|
||||
pSprite->index = nSprite;
|
||||
|
||||
Numsprites++;
|
||||
|
||||
|
@ -806,7 +804,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, int
|
|||
pSprite->statnum = LittleShort(load.statnum);
|
||||
pSprite->ang = LittleShort(load.ang);
|
||||
pSprite->owner = LittleShort(load.owner);
|
||||
pSprite->index = LittleShort(load.index);
|
||||
pSprite->xvel = LittleShort(load.index);
|
||||
pSprite->yvel = LittleShort(load.yvel);
|
||||
pSprite->inittype = LittleShort(load.inittype);
|
||||
pSprite->type = LittleShort(load.type);
|
||||
|
@ -827,7 +825,6 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, int
|
|||
InsertSpriteSect(i, pSprite->sectnum);
|
||||
InsertSpriteStat(i, pSprite->statnum);
|
||||
Numsprites++;
|
||||
pSprite->index = i;
|
||||
if (pSprite->extra > 0)
|
||||
{
|
||||
char pBuffer[nXSpriteSize];
|
||||
|
@ -896,7 +893,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, int
|
|||
pXSprite->dudeAmbush = bitReader.readUnsigned(1);
|
||||
pXSprite->dudeGuard = bitReader.readUnsigned(1);
|
||||
pXSprite->dudeFlag4 = bitReader.readUnsigned(1);
|
||||
pXSprite->target_i = bitReader.readSigned(16);
|
||||
/*pXSprite->target_i = */ bitReader.readSigned(16);
|
||||
pXSprite->targetX = bitReader.readSigned(32);
|
||||
pXSprite->targetY = bitReader.readSigned(32);
|
||||
pXSprite->targetZ = bitReader.readSigned(32);
|
||||
|
|
|
@ -671,7 +671,7 @@ void playerStart(int nPlayer, int bNewLevel)
|
|||
playerResetPosture(pPlayer);
|
||||
seqSpawn(pDudeInfo->seqStartID, actor, -1);
|
||||
if (pPlayer == gMe)
|
||||
actor->s().cstat2 |= CSTAT2_SPRITE_MAPPED;
|
||||
actor->s().cstat2 |= CSTAT2_SPRITE_MAPPED;
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
pSprite->z -= bottom - pSprite->z;
|
||||
|
|
|
@ -90,7 +90,7 @@ void BloodSoundEngine::CalcPosVel(int type, const void* source, const float pt[3
|
|||
{
|
||||
auto sprt = (spritetype*)source;
|
||||
assert(sprt != nullptr);
|
||||
auto actor = &bloodActors[sprt->index];
|
||||
auto actor = &bloodActors[sprt - sprite];
|
||||
|
||||
// Engine expects velocity in units per second, not units per tic.
|
||||
if (vel) *vel = { actor->xvel * (30 / 65536.f), actor->zvel * (-30 / 65536.f), actor->yvel * (-30 / 65536.f) };
|
||||
|
|
Loading…
Reference in a new issue