mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- deleted PLAYER::pSprite.
This commit is contained in:
parent
648537a96b
commit
87894a5640
4 changed files with 8 additions and 11 deletions
|
@ -660,7 +660,6 @@ void playerStart(int nPlayer, int bNewLevel)
|
|||
auto actor = actSpawnSprite(pStartZone->sector, pStartZone->x, pStartZone->y, pStartZone->z, 6, 1);
|
||||
assert(actor->hasX());
|
||||
XSPRITE *pXSprite = &actor->x();
|
||||
pPlayer->pSprite = &actor->spr;
|
||||
pPlayer->pXSprite = pXSprite;
|
||||
pPlayer->actor = actor;
|
||||
DUDEINFO *pDudeInfo = &dudeInfo[kDudePlayer1 + nPlayer - kDudeBase];
|
||||
|
@ -2360,9 +2359,8 @@ void SerializePlayers(FSerializer& arc)
|
|||
{
|
||||
for (int i = 0; i < gNetPlayers; i++)
|
||||
{
|
||||
gPlayer[i].pSprite = &gPlayer[i].actor->s();
|
||||
gPlayer[i].pXSprite = &gPlayer[i].actor->x();
|
||||
gPlayer[i].pDudeInfo = &dudeInfo[gPlayer[i].pSprite->type - kDudeBase];
|
||||
gPlayer[i].pDudeInfo = &dudeInfo[gPlayer[i].actor->spr.type - kDudeBase];
|
||||
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
// load qav scene
|
||||
|
|
|
@ -81,7 +81,6 @@ extern POSTURE gPostureDefaults[kModeMax][kPostureMax];
|
|||
struct PLAYER
|
||||
{
|
||||
TObjPtr<DBloodActor*> actor;
|
||||
spritetype* pSprite;
|
||||
XSPRITE* pXSprite;
|
||||
DUDEINFO* pDudeInfo;
|
||||
InputPacket input;
|
||||
|
|
|
@ -471,10 +471,10 @@ void OperateSprite(DBloodActor* actor, EVENT event)
|
|||
pXSprite->isTriggered = 1;
|
||||
SetSpriteState(actor, 1);
|
||||
for (int p = connecthead; p >= 0; p = connectpoint2[p]) {
|
||||
spritetype *pPlayerSprite = gPlayer[p].pSprite;
|
||||
int dx = (actor->spr.pos.X - pPlayerSprite->pos.X)>>4;
|
||||
int dy = (actor->spr.pos.Y - pPlayerSprite->pos.Y)>>4;
|
||||
int dz = (actor->spr.pos.Z - pPlayerSprite->pos.Z)>>8;
|
||||
auto vec = actor->spr.pos - gPlayer[p].actor->spr.pos;
|
||||
int dx = (vec.X)>>4;
|
||||
int dy = (vec.Y)>>4;
|
||||
int dz = (vec.Z)>>8;
|
||||
int nDist = dx*dx+dy*dy+dz*dz+0x40000;
|
||||
gPlayer[p].quakeEffect = DivScale(pXSprite->data1, nDist, 16);
|
||||
}
|
||||
|
|
|
@ -475,7 +475,7 @@ void SetupView(int &cX, int& cY, int& cZ, binangle& cA, fixedhoriz& cH, sectorty
|
|||
}
|
||||
else
|
||||
{
|
||||
calcChaseCamPos((int*)&cX, (int*)&cY, (int*)&cZ, gView->pSprite, &pSector, cA, cH, gInterpolate);
|
||||
calcChaseCamPos((int*)&cX, (int*)&cY, (int*)&cZ, &gView->actor->spr, &pSector, cA, cH, gInterpolate);
|
||||
}
|
||||
CheckLink((int*)&cX, (int*)&cY, (int*)&cZ, &pSector);
|
||||
}
|
||||
|
@ -526,7 +526,7 @@ void renderCrystalBall()
|
|||
vd4 += QRandom2(nValue >> 4);
|
||||
vd0 += QRandom2(nValue);
|
||||
}
|
||||
CalcOtherPosition(pOther->pSprite, &vd8, &vd4, &vd0, &vcc, v50, 0, (int)gInterpolate);
|
||||
CalcOtherPosition(pOther->actor, &vd8, &vd4, &vd0, &vcc, v50, 0, (int)gInterpolate);
|
||||
CheckLink(&vd8, &vd4, &vd0, &vcc);
|
||||
uint8_t v14 = 0;
|
||||
if (IsUnderwaterSector(vcc))
|
||||
|
@ -711,7 +711,7 @@ void viewDrawScreen(bool sceneonly)
|
|||
UpdateDacs(0, true); // keep the view palette active only for the actual 3D view and its overlays.
|
||||
if (automapMode != am_off)
|
||||
{
|
||||
DrawMap (gView->pSprite);
|
||||
DrawMap (&gView->actor->spr);
|
||||
}
|
||||
UpdateStatusBar();
|
||||
int zn = ((gView->zWeapon-gView->zView-(12<<8))>>7)+220;
|
||||
|
|
Loading…
Reference in a new issue