mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-01 09:42:27 +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);
|
GetSpriteExtents(pSprite, &top, &bottom);
|
||||||
pSprite->x = pSprite2->x;
|
pSprite->x = pSprite2->x;
|
||||||
pSprite->y = pSprite2->y;
|
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;
|
pSprite->ang = pSprite2->ang;
|
||||||
ChangeActorSect(actor, pSprite2->sectnum);
|
ChangeActorSect(actor, pSprite2->sectnum);
|
||||||
sfxPlay3DSound(pSprite2, 201, -1, 0);
|
sfxPlay3DSound(pSprite2, 201, -1, 0);
|
||||||
|
|
|
@ -196,8 +196,8 @@ void CFX::fxProcess(void)
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &actor->s();
|
spritetype *pSprite = &actor->s();
|
||||||
viewBackupSpriteLoc(actor);
|
viewBackupSpriteLoc(actor);
|
||||||
int nSector = pSprite->sectnum;
|
auto pSector = pSprite->sector();
|
||||||
assert(validSectorIndex(nSector));
|
assert(pSector);
|
||||||
assert(pSprite->type < kFXMax);
|
assert(pSprite->type < kFXMax);
|
||||||
FXDATA *pFXData = &gFXData[pSprite->type];
|
FXDATA *pFXData = &gFXData[pSprite->type];
|
||||||
actAirDrag(actor, pFXData->drag);
|
actAirDrag(actor, pFXData->drag);
|
||||||
|
@ -207,8 +207,8 @@ void CFX::fxProcess(void)
|
||||||
// Weird...
|
// Weird...
|
||||||
if (actor->xvel || (actor->yvel && pSprite->z >= pSprite->sector()->floorz))
|
if (actor->xvel || (actor->yvel && pSprite->z >= pSprite->sector()->floorz))
|
||||||
{
|
{
|
||||||
updatesector(pSprite->x, pSprite->y, &nSector);
|
updatesector(pSprite->x, pSprite->y, &pSector);
|
||||||
if (nSector == -1)
|
if (pSector == nullptr)
|
||||||
{
|
{
|
||||||
remove(actor);
|
remove(actor);
|
||||||
continue;
|
continue;
|
||||||
|
@ -223,17 +223,17 @@ void CFX::fxProcess(void)
|
||||||
gCallback[pFXData->funcID](actor, nullptr);
|
gCallback[pFXData->funcID](actor, nullptr);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (nSector != pSprite->sectnum)
|
if (pSector != pSprite->sector())
|
||||||
{
|
{
|
||||||
assert(validSectorIndex(nSector));
|
assert(pSector);
|
||||||
ChangeActorSect(actor, nSector);
|
ChangeActorSect(actor, pSector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (actor->xvel || actor->yvel || actor->zvel)
|
if (actor->xvel || actor->yvel || actor->zvel)
|
||||||
{
|
{
|
||||||
int32_t floorZ, ceilZ;
|
int32_t floorZ, ceilZ;
|
||||||
getzsofslope(nSector, pSprite->x, pSprite->y, &ceilZ, &floorZ);
|
getzsofslopeptr(pSector, pSprite->x, pSprite->y, &ceilZ, &floorZ);
|
||||||
if (ceilZ > pSprite->z && !(sector[nSector].ceilingstat&1))
|
if (ceilZ > pSprite->z && !(pSector->ceilingstat&1))
|
||||||
{
|
{
|
||||||
remove(actor);
|
remove(actor);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue