mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- fxProcess
This commit is contained in:
parent
f52a542fad
commit
4438c20cb4
2 changed files with 10 additions and 10 deletions
|
@ -603,7 +603,7 @@ void sub_76A08(DBloodActor *actor, spritetype *pSprite2, PLAYER *pPlayer) // ???
|
|||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
pSprite->x = pSprite2->x;
|
||||
pSprite->y = pSprite2->y;
|
||||
pSprite->z = sector[pSprite2->sectnum].floorz-(bottom-pSprite->z);
|
||||
pSprite->z = pSprite2->sector()->floorz-(bottom-pSprite->z);
|
||||
pSprite->ang = pSprite2->ang;
|
||||
ChangeActorSect(actor, pSprite2->sectnum);
|
||||
sfxPlay3DSound(pSprite2, 201, -1, 0);
|
||||
|
|
|
@ -196,8 +196,8 @@ void CFX::fxProcess(void)
|
|||
{
|
||||
spritetype *pSprite = &actor->s();
|
||||
viewBackupSpriteLoc(actor);
|
||||
int nSector = pSprite->sectnum;
|
||||
assert(validSectorIndex(nSector));
|
||||
auto pSector = pSprite->sector();
|
||||
assert(pSector);
|
||||
assert(pSprite->type < kFXMax);
|
||||
FXDATA *pFXData = &gFXData[pSprite->type];
|
||||
actAirDrag(actor, pFXData->drag);
|
||||
|
@ -207,8 +207,8 @@ void CFX::fxProcess(void)
|
|||
// Weird...
|
||||
if (actor->xvel || (actor->yvel && pSprite->z >= pSprite->sector()->floorz))
|
||||
{
|
||||
updatesector(pSprite->x, pSprite->y, &nSector);
|
||||
if (nSector == -1)
|
||||
updatesector(pSprite->x, pSprite->y, &pSector);
|
||||
if (pSector == nullptr)
|
||||
{
|
||||
remove(actor);
|
||||
continue;
|
||||
|
@ -223,17 +223,17 @@ void CFX::fxProcess(void)
|
|||
gCallback[pFXData->funcID](actor, nullptr);
|
||||
continue;
|
||||
}
|
||||
if (nSector != pSprite->sectnum)
|
||||
if (pSector != pSprite->sector())
|
||||
{
|
||||
assert(validSectorIndex(nSector));
|
||||
ChangeActorSect(actor, nSector);
|
||||
assert(pSector);
|
||||
ChangeActorSect(actor, pSector);
|
||||
}
|
||||
}
|
||||
if (actor->xvel || actor->yvel || actor->zvel)
|
||||
{
|
||||
int32_t floorZ, ceilZ;
|
||||
getzsofslope(nSector, pSprite->x, pSprite->y, &ceilZ, &floorZ);
|
||||
if (ceilZ > pSprite->z && !(sector[nSector].ceilingstat&1))
|
||||
getzsofslopeptr(pSector, pSprite->x, pSprite->y, &ceilZ, &floorZ);
|
||||
if (ceilZ > pSprite->z && !(pSector->ceilingstat&1))
|
||||
{
|
||||
remove(actor);
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue