- renamed velFloor and velCeil.

This commit is contained in:
Christoph Oelckers 2022-09-04 00:15:44 +02:00
parent 1833e7de7e
commit 38bb103cdd
7 changed files with 22 additions and 22 deletions

View file

@ -310,8 +310,8 @@ struct sectortype
TObjPtr<DCoreActor*> lowerLink; TObjPtr<DCoreActor*> lowerLink;
double baseFloor; double baseFloor;
double baseCeil; double baseCeil;
int velFloor; int _velFloor;
int velCeil; int _velCeil;
uint8_t slopewallofs; // This was originally the repurposed filler byte. uint8_t slopewallofs; // This was originally the repurposed filler byte.
}; };
struct // Exhumed struct // Exhumed

View file

@ -553,8 +553,8 @@ FSerializer &Serialize(FSerializer &arc, const char *key, sectortype &c, sectort
("lowerlink", c.lowerLink, def->lowerLink) ("lowerlink", c.lowerLink, def->lowerLink)
("basefloor", c.baseFloor, def->baseFloor) ("basefloor", c.baseFloor, def->baseFloor)
("baseCeil", c.baseCeil, def->baseCeil) ("baseCeil", c.baseCeil, def->baseCeil)
("velfloor", c.velFloor, def->velFloor) ("velfloor", c._velFloor, def->_velFloor)
("velCeil", c.velCeil, def->velCeil) ("velCeil", c._velCeil, def->_velCeil)
("slopwwallofs", c.slopewallofs, def->slopewallofs); ("slopwwallofs", c.slopewallofs, def->slopewallofs);
if (arc.isWriting()) if (arc.isWriting())

View file

@ -4608,7 +4608,7 @@ static Collision MoveThing(DBloodActor* actor)
actor->hit.florhit = floorColl; actor->hit.florhit = floorColl;
actor->add_int_z(floorZ - bottom); actor->add_int_z(floorZ - bottom);
int v20 = actor->int_vel().Z - actor->sector()->velFloor; int v20 = actor->int_vel().Z - actor->sector()->_velFloor;
if (v20 > 0) if (v20 > 0)
{ {
@ -4622,7 +4622,7 @@ static Collision MoveThing(DBloodActor* actor)
if (nDamage > 0) actDamageSprite(actor, actor, kDamageFall, nDamage); if (nDamage > 0) actDamageSprite(actor, actor, kDamageFall, nDamage);
actor->set_int_bvel_z(FloatToFixed(vec4.Z)); actor->set_int_bvel_z(FloatToFixed(vec4.Z));
if (actor->sector()->velFloor == 0 && abs(actor->int_vel().Z) < 0x10000) if (actor->sector()->_velFloor == 0 && abs(actor->int_vel().Z) < 0x10000)
{ {
actor->vel.Z = 0; actor->vel.Z = 0;
actor->spr.flags &= ~4; actor->spr.flags &= ~4;
@ -5097,7 +5097,7 @@ void MoveDude(DBloodActor* actor)
{ {
actor->hit.florhit = floorColl; actor->hit.florhit = floorColl;
actor->add_int_z(floorZ - bottom); actor->add_int_z(floorZ - bottom);
int v30 = actor->int_vel().Z - actor->sector()->velFloor; int v30 = actor->int_vel().Z - actor->sector()->_velFloor;
if (v30 > 0) if (v30 > 0)
{ {
auto vec4 = actFloorBounceVector(actor, FixedToFloat(v30), actor->sector(), 0); auto vec4 = actFloorBounceVector(actor, FixedToFloat(v30), actor->sector(), 0);
@ -5120,7 +5120,7 @@ void MoveDude(DBloodActor* actor)
actor->set_int_bvel_z(FloatToFixed(vec4.Z)); actor->set_int_bvel_z(FloatToFixed(vec4.Z));
if (abs(actor->int_vel().Z) < 0x10000) if (abs(actor->int_vel().Z) < 0x10000)
{ {
actor->set_int_bvel_z(actor->sector()->velFloor); actor->set_int_bvel_z(actor->sector()->_velFloor);
actor->spr.flags &= ~4; actor->spr.flags &= ~4;
} }
else else
@ -5682,7 +5682,7 @@ static void actCheckThings()
actAirDrag(actor, 128); actAirDrag(actor, 128);
if (((actor->GetIndex() >> 8) & 15) == (gFrameCount & 15) && (actor->spr.flags & 2)) actor->spr.flags |= 4; if (((actor->GetIndex() >> 8) & 15) == (gFrameCount & 15) && (actor->spr.flags & 2)) actor->spr.flags |= 4;
if ((actor->spr.flags & 4) || actor->vel.X != 0 || actor->vel.Y != 0 || actor->vel.Z != 0 || actor->sector()->velFloor || actor->sector()->velCeil) if ((actor->spr.flags & 4) || actor->vel.X != 0 || actor->vel.Y != 0 || actor->vel.Z != 0 || actor->sector()->_velFloor || actor->sector()->_velCeil)
{ {
Collision hit = MoveThing(actor); Collision hit = MoveThing(actor);
if (hit.type) if (hit.type)
@ -6110,7 +6110,7 @@ static void actCheckDudes()
if (pXSector && pXSector->Underwater) actAirDrag(actor, 5376); if (pXSector && pXSector->Underwater) actAirDrag(actor, 5376);
else actAirDrag(actor, 128); else actAirDrag(actor, 128);
if ((actor->spr.flags & 4) || actor->vel.X != 0 || actor->vel.Y != 0 || actor->vel.Z != 0 || actor->sector()->velFloor || actor->sector()->velCeil) if ((actor->spr.flags & 4) || actor->vel.X != 0 || actor->vel.Y != 0 || actor->vel.Z != 0 || actor->sector()->_velFloor || actor->sector()->_velCeil)
MoveDude(actor); MoveDude(actor);
} }
} }

View file

@ -517,7 +517,7 @@ void fxBouncingSleeve(DBloodActor* actor, sectortype*) // 16
int top, bottom; GetActorExtents(actor, &top, &bottom); int top, bottom; GetActorExtents(actor, &top, &bottom);
actor->add_int_z(floorZ - bottom); actor->add_int_z(floorZ - bottom);
int zv = actor->int_vel().Z - actor->sector()->velFloor; int zv = actor->int_vel().Z - actor->sector()->_velFloor;
if (actor->vel.Z == 0) sleeveStopBouncing(actor); if (actor->vel.Z == 0) sleeveStopBouncing(actor);
else if (zv > 0) else if (zv > 0)
@ -525,7 +525,7 @@ void fxBouncingSleeve(DBloodActor* actor, sectortype*) // 16
auto vec4 = actFloorBounceVector(actor, FixedToFloat(zv), actor->sector(), FixedToFloat(0x9000)); auto vec4 = actFloorBounceVector(actor, FixedToFloat(zv), actor->sector(), FixedToFloat(0x9000));
actor->vel = vec4.XYZ(); actor->vel = vec4.XYZ();
if (actor->sector()->velFloor == 0 && abs(actor->int_vel().Z) < 0x20000) { if (actor->sector()->_velFloor == 0 && abs(actor->int_vel().Z) < 0x20000) {
sleeveStopBouncing(actor); sleeveStopBouncing(actor);
return; return;
} }

View file

@ -1343,7 +1343,7 @@ void nnExtProcessSuperSprites()
} }
if (debrisactor->xspr.physAttr & kPhysGravity) debrisactor->xspr.physAttr |= kPhysFalling; if (debrisactor->xspr.physAttr & kPhysGravity) debrisactor->xspr.physAttr |= kPhysFalling;
if ((debrisactor->xspr.physAttr & kPhysFalling) || debrisactor->vel.X != 0 || debrisactor->vel.Y != 0 || debrisactor->vel.Z != 0 || debrisactor->sector()->velFloor || debrisactor->sector()->velCeil) if ((debrisactor->xspr.physAttr & kPhysFalling) || debrisactor->vel.X != 0 || debrisactor->vel.Y != 0 || debrisactor->vel.Z != 0 || debrisactor->sector()->_velFloor || debrisactor->sector()->_velCeil)
debrisMove(i); debrisMove(i);
if (debrisactor->vel.X != 0 || debrisactor->int_vel().Y) if (debrisactor->vel.X != 0 || debrisactor->int_vel().Y)
@ -1780,7 +1780,7 @@ void debrisMove(int listIndex)
if (floorZ <= bottom) { if (floorZ <= bottom) {
actor->hit.florhit = floorColl; actor->hit.florhit = floorColl;
int v30 = actor->int_vel().Z - actor->sector()->velFloor; int v30 = actor->int_vel().Z - actor->sector()->_velFloor;
if (v30 > 0) if (v30 > 0)
{ {
@ -1791,7 +1791,7 @@ void debrisMove(int listIndex)
if (abs(actor->int_vel().Z) < 0x10000) if (abs(actor->int_vel().Z) < 0x10000)
{ {
actor->set_int_bvel_z(actor->sector()->velFloor); actor->set_int_bvel_z(actor->sector()->_velFloor);
actor->xspr.physAttr &= ~kPhysFalling; actor->xspr.physAttr &= ~kPhysFalling;
} }

View file

@ -1020,7 +1020,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
int oldZ = pSector->int_floorz(); int oldZ = pSector->int_floorz();
pSector->set_int_floorz((pXSector->offFloorZ + MulScale(dfz, GetWaveValue(a3, a4), 16))); pSector->set_int_floorz((pXSector->offFloorZ + MulScale(dfz, GetWaveValue(a3, a4), 16)));
pSector->baseFloor = pSector->floorz; pSector->baseFloor = pSector->floorz;
pSector->velFloor += (pSector->int_floorz() - oldZ) << 8; pSector->_velFloor += (pSector->int_floorz() - oldZ) << 8;
BloodSectIterator it(pSector); BloodSectIterator it(pSector);
while (auto actor = it.Next()) while (auto actor = it.Next())
@ -1068,7 +1068,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
int oldZ = pSector->int_ceilingz(); int oldZ = pSector->int_ceilingz();
pSector->set_int_ceilingz((pXSector->offCeilZ + MulScale(dcz, GetWaveValue(a3, a4), 16))); pSector->set_int_ceilingz((pXSector->offCeilZ + MulScale(dcz, GetWaveValue(a3, a4), 16)));
pSector->baseCeil = pSector->ceilingz; pSector->baseCeil = pSector->ceilingz;
pSector->velCeil += (pSector->int_ceilingz() - oldZ) << 8; pSector->_velCeil += (pSector->int_ceilingz() - oldZ) << 8;
BloodSectIterator it(pSector); BloodSectIterator it(pSector);
while (auto actor = it.Next()) while (auto actor = it.Next())
@ -2214,7 +2214,7 @@ void trProcessBusy(void)
{ {
for (auto& sect : sector) for (auto& sect : sector)
{ {
sect.velCeil = sect.velFloor = 0; sect._velCeil = sect._velFloor = 0;
} }
for (int i = gBusy.Size()-1; i >= 0; i--) for (int i = gBusy.Size()-1; i >= 0; i--)
{ {

View file

@ -154,10 +154,10 @@ struct sectortype native
BLD_NS::XSECTOR* _xs; BLD_NS::XSECTOR* _xs;
TObjPtr<DCoreActor*> upperLink; TObjPtr<DCoreActor*> upperLink;
TObjPtr<DCoreActor*> lowerLink; TObjPtr<DCoreActor*> lowerLink;
int baseFloor; double baseFloor;
int baseCeil; double baseCeil;
int velFloor; double velFloor;
int velCeil; double velCeil;
uint8_t slopewallofs; // This was originally the repurposed filler byte. uint8_t slopewallofs; // This was originally the repurposed filler byte.
} }
struct // Exhumed struct // Exhumed