mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 07:31:03 +00:00
- get rid of '.sectnum'.
This commit is contained in:
parent
669aa033e9
commit
38c0bc915d
4 changed files with 11 additions and 5 deletions
|
@ -409,7 +409,7 @@ void GibSprite(DBloodActor* actor, GIBTYPE nGibType, CGibPosition *pPos, CGibVel
|
|||
assert(actor != NULL);
|
||||
assert(nGibType >= 0 && nGibType < kGibMax);
|
||||
|
||||
if (actor->s().sectnum < 0 || actor->s().sectnum >= numsectors)
|
||||
if (!actor->s().insector())
|
||||
return;
|
||||
GIBLIST *pGib = &gibList[nGibType];
|
||||
for (int i = 0; i < pGib->Kills; i++)
|
||||
|
|
|
@ -1836,7 +1836,7 @@ void debrisMove(int listIndex)
|
|||
if ((pFX = gFX.fxSpawnActor(FX_10, pSprite->sectnum, pSprite->x, pSprite->y, floorZ, 0)) == NULL) break;
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
if ((pFX2 = gFX.fxSpawnActor(FX_14, pFX->s().sectnum, pFX->s().x, pFX->s().y, pFX->s().z, 0)) == NULL) continue;
|
||||
if ((pFX2 = gFX.fxSpawnActor(FX_14, pFX->s().sector(), pFX->s().x, pFX->s().y, pFX->s().z, 0)) == NULL) continue;
|
||||
pFX2->xvel = Random2(0x6aaaa);
|
||||
pFX2->yvel = Random2(0x6aaaa);
|
||||
pFX2->zvel = -(int)Random(0xd5555);
|
||||
|
@ -1917,7 +1917,7 @@ bool ceilIsTooLow(DBloodActor* actor)
|
|||
{
|
||||
if (actor != nullptr)
|
||||
{
|
||||
sectortype* pSector = §or[actor->s().sectnum];
|
||||
sectortype* pSector = actor->s().sector();
|
||||
int a = pSector->ceilingz - pSector->floorz;
|
||||
int top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
|
|
|
@ -48,6 +48,7 @@ static VIEW predictFifo[256];
|
|||
|
||||
void viewInitializePrediction(void)
|
||||
{
|
||||
#if 0
|
||||
predict.angle = gMe->angle.ang;
|
||||
predict.horiz = gMe->horizon.horiz;
|
||||
predict.horizoff = gMe->horizon.horizoff;
|
||||
|
@ -59,7 +60,7 @@ void viewInitializePrediction(void)
|
|||
predict.x = gMe->pSprite->x;
|
||||
predict.y = gMe->pSprite->y;
|
||||
predict.z = gMe->pSprite->z;
|
||||
predict.sectnum = gMe->pSprite->sectnum;
|
||||
predict.sector = gMe->pSprite->sector;
|
||||
predict.at73 = gMe->pSprite->flags;
|
||||
predict.xvel = gMe->actor->xvel;
|
||||
predict.yvel = gMe->actor->yvel;
|
||||
|
@ -83,6 +84,7 @@ void viewInitializePrediction(void)
|
|||
predict.at40 = gMe->zWeapon;
|
||||
predict.at44 = gMe->zWeaponVel;
|
||||
predictOld = predict;
|
||||
#endif
|
||||
}
|
||||
|
||||
void viewUpdatePrediction(InputPacket *pInput)
|
||||
|
@ -105,6 +107,7 @@ static void sub_158B4(PLAYER *pPlayer)
|
|||
|
||||
static void fakeProcessInput(PLAYER *pPlayer, InputPacket *pInput)
|
||||
{
|
||||
#if 0
|
||||
POSTURE *pPosture = &pPlayer->pPosture[pPlayer->lifeMode][predict.at48];
|
||||
|
||||
predict.at70 = !!(gMe->input.actions & SB_RUN);
|
||||
|
@ -254,6 +257,7 @@ static void fakeProcessInput(PLAYER *pPlayer, InputPacket *pInput)
|
|||
predict.horizoff = q16horiz(0);
|
||||
}
|
||||
predict.at2c = -predict.horiz.asq16() >> 9;
|
||||
#endif
|
||||
}
|
||||
|
||||
void fakePlayerProcess(PLAYER *pPlayer, InputPacket *pInput)
|
||||
|
|
|
@ -402,9 +402,10 @@ void SetupView(int &cX, int& cY, int& cZ, binangle& cA, fixedhoriz& cH, int& nSe
|
|||
int bobWidth, bobHeight;
|
||||
|
||||
nSectnum = gView->pSprite->sectnum;
|
||||
#if 0
|
||||
if (numplayers > 1 && gView == gMe && gPrediction && gMe->pXSprite->health > 0)
|
||||
{
|
||||
nSectnum = predict.sectnum;
|
||||
nSectnum = predict. sectnum;
|
||||
cX = interpolatedvalue(predictOld.x, predict.x, gInterpolate);
|
||||
cY = interpolatedvalue(predictOld.y, predict.y, gInterpolate);
|
||||
cZ = interpolatedvalue(predictOld.viewz, predict.viewz, gInterpolate);
|
||||
|
@ -428,6 +429,7 @@ void SetupView(int &cX, int& cY, int& cZ, binangle& cA, fixedhoriz& cH, int& nSe
|
|||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
VIEW* pView = &gPrevView[gViewIndex];
|
||||
cX = interpolatedvalue(pView->x, gView->pSprite->x, gInterpolate);
|
||||
|
|
Loading…
Reference in a new issue