- some simple replacements

This commit is contained in:
Christoph Oelckers 2022-09-03 10:11:05 +02:00
parent 18cc450889
commit ac84e3f045
3 changed files with 6 additions and 11 deletions

View file

@ -4624,7 +4624,7 @@ static Collision MoveThing(DBloodActor* actor)
actor->set_int_bvel_z(FloatToFixed(vec4.Z));
if (actor->sector()->velFloor == 0 && abs(actor->int_vel().Z) < 0x10000)
{
actor->set_int_bvel_z(0);
actor->vel.Z = 0;
actor->spr.flags &= ~4;
}

View file

@ -243,9 +243,7 @@ void fxDynPuff(DBloodActor* actor, sectortype*) // 8
auto pFX = gFX.fxSpawnActor(FX_7, actor->sector(), x, y, z, 0);
if (pFX)
{
pFX->set_int_bvel_x(actor->int_vel().X);
pFX->set_int_bvel_y(actor->int_vel().Y);
pFX->set_int_bvel_z(actor->int_vel().Z);
pFX->vel = actor->vel;
}
}
evPostActor(actor, 12, kCallbackFXDynPuff);

View file

@ -3140,9 +3140,7 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi
auto velv = pSprite->vel.XY();
auto pt = rotatepoint(pSprite->spr.pos.XY(), velv, angl);
//actor->vel.XY() = pt;
pSprite->set_int_bvel_x(pt.X * worldtoint);
pSprite->set_int_bvel_y(pt.Y * worldtoint);
pSprite->vel.XY() = pt;
vAng = getVelocityAngle(pSprite);
@ -3294,13 +3292,12 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
{
auto velv = actor->vel.XY();
auto pt = rotatepoint(actor->spr.pos.XY(), velv, sourceactor->spr.angle - VecToAngle(velv));
//actor->vel.XY() = pt;
actor->set_int_bvel_x(pt.X * worldtoint);
actor->set_int_bvel_y(pt.Y * worldtoint);
actor->vel.XY() = pt;
}
if (sourceactor->xspr.data3 & kModernTypeFlag4)
actor->set_int_bvel_z(0);
actor->vel.Z = 0;
}
if (sourceactor->xspr.data2 == 1)