- set_int_bvel_x

This commit is contained in:
Christoph Oelckers 2022-09-01 21:18:16 +02:00
parent b78d5a95ac
commit 761da2b06e
16 changed files with 72 additions and 72 deletions

View file

@ -4091,7 +4091,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
static void actKickObject(DBloodActor* kicker, DBloodActor* kicked)
{
int nSpeed = ClipLow(approxDist(kicker->int_vel().X, kicker->int_vel().Y) * 2, 0xaaaaa);
kicked->__int_vel.X = MulScale(nSpeed, Cos(kicker->int_ang() + Random2(85)), 30);
kicked->set_int_bvel_x(MulScale(nSpeed, Cos(kicker->int_ang() + Random2(85)), 30));
kicked->__int_vel.Y = MulScale(nSpeed, Sin(kicker->int_ang() + Random2(85)), 30);
kicked->__int_vel.Z = MulScale(nSpeed, -0x2000, 14);
kicked->spr.flags = 7;
@ -4592,7 +4592,7 @@ static Collision MoveThing(DBloodActor* actor)
RotateVector(&v2c, &v28, vbx);
RotateVector(&v2c, &v24, v30);
RotateVector(&v28, &v24, v34);
fxActor->__int_vel.X = actor->int_vel().X + v2c;
fxActor->set_int_bvel_x(actor->int_vel().X + v2c);
fxActor->__int_vel.Y = actor->int_vel().Y + v28;
fxActor->__int_vel.Z = actor->int_vel().Z + v24;
}
@ -4663,7 +4663,7 @@ static Collision MoveThing(DBloodActor* actor)
actor->add_int_z(ClipLow(ceilZ - top, 0));
if (actor->__int_vel.Z < 0)
{
actor->__int_vel.X = MulScale(actor->int_vel().X, 0xc000, 16);
actor->set_int_bvel_x(MulScale(actor->int_vel().X, 0xc000, 16));
actor->__int_vel.Y = MulScale(actor->int_vel().Y, 0xc000, 16);
actor->__int_vel.Z = MulScale(-actor->int_vel().Z, 0x4000, 16);
@ -5138,7 +5138,7 @@ void MoveDude(DBloodActor* actor)
auto pFX2 = gFX.fxSpawnActor(FX_14, pFX->sector(), pFX->spr.pos, 0);
if (pFX2)
{
pFX2->__int_vel.X = Random2(0x6aaaa);
pFX2->set_int_bvel_x(Random2(0x6aaaa));
pFX2->__int_vel.Y = Random2(0x6aaaa);
pFX2->__int_vel.Z = -(int)Random(0xd5555);
}
@ -5232,7 +5232,7 @@ int MoveMissile(DBloodActor* actor)
int vx = missileInfo[actor->spr.type - kMissileBase].velocity;
int vy = 0;
RotatePoint(&vx, &vy, (nTargetAngle + 1536) & 2047, 0, 0);
actor->__int_vel.X = vx;
actor->set_int_bvel_x(vx);
actor->__int_vel.Y = vy;
int dz = target->int_pos().Z - actor->int_pos().Z;
@ -5945,7 +5945,7 @@ static void actCheckTraps()
auto pFX = gFX.fxSpawnActor(FX_32, actor->sector(), x, y, z, 0);
if (pFX)
{
pFX->__int_vel.X = dx + Random2(0x8888);
pFX->set_int_bvel_x(dx + Random2(0x8888));
pFX->__int_vel.Y = dy + Random2(0x8888);
pFX->__int_vel.Z = Random2(0x8888);
}
@ -6400,7 +6400,7 @@ DBloodActor* actFireThing(DBloodActor* actor, int a2, int a3, int a4, int thingT
auto fired = actSpawnThing(actor->sector(), x, y, z, thingType);
fired->SetOwner(actor);
fired->spr.angle = actor->spr.angle;
fired->__int_vel.X = MulScale(a6, Cos(fired->int_ang()), 30);
fired->set_int_bvel_x(MulScale(a6, Cos(fired->int_ang()), 30));
fired->__int_vel.Y = MulScale(a6, Sin(fired->int_ang()), 30);
fired->__int_vel.Z = MulScale(a6, a4, 14);
fired->add_int_bvel_x(actor->int_vel().X / 2);
@ -6533,7 +6533,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, int a2, int a3, int a4, int a5,
spawned->spr.yrepeat = pMissileInfo->yrepeat;
spawned->spr.picnum = pMissileInfo->picnum;
spawned->set_int_ang((actor->int_ang() + pMissileInfo->angleOfs) & 2047);
spawned->__int_vel.X = MulScale(pMissileInfo->velocity, a4, 14);
spawned->set_int_bvel_x(MulScale(pMissileInfo->velocity, a4, 14));
spawned->__int_vel.Y = MulScale(pMissileInfo->velocity, a5, 14);
spawned->__int_vel.Z = MulScale(pMissileInfo->velocity, a6, 14);
spawned->SetOwner(actor);

View file

@ -348,7 +348,7 @@ void aiMoveDodge(DBloodActor* actor)
else
t2 -= pDudeInfo->sideSpeed;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
}
}

View file

@ -214,7 +214,7 @@ static void batMoveDodgeUp(DBloodActor* actor)
else
t2 -= pDudeInfo->sideSpeed;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = -0x52aaa;
}
@ -239,7 +239,7 @@ static void batMoveDodgeDown(DBloodActor* actor)
else
t2 -= pDudeInfo->sideSpeed;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = 0x44444;
}
@ -329,7 +329,7 @@ static void batMoveForward(DBloodActor* actor)
t1 += nAccel;
else
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
}
@ -357,7 +357,7 @@ static void batMoveSwoop(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = 0x44444;
}
@ -386,7 +386,7 @@ static void batMoveFly(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = -0x2d555;
}

View file

@ -432,7 +432,7 @@ static void sub_628A0(DBloodActor* actor)
t1 += nAccel;
else
t1 += nAccel >> 2;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
}
@ -465,7 +465,7 @@ static void sub_62AE0(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = -dz;
}
@ -499,7 +499,7 @@ static void sub_62D7C(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = dz;
}

View file

@ -229,7 +229,7 @@ static void eelMoveDodgeUp(DBloodActor* actor)
else
t2 -= pDudeInfo->sideSpeed;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = -0x8000;
}
@ -254,7 +254,7 @@ static void eelMoveDodgeDown(DBloodActor* actor)
else
t2 -= pDudeInfo->sideSpeed;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = 0x44444;
}
@ -341,7 +341,7 @@ static void eelMoveForward(DBloodActor* actor)
t1 += nAccel;
else
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
}
@ -366,7 +366,7 @@ static void eelMoveSwoop(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = 0x22222;
}
@ -392,7 +392,7 @@ static void eelMoveAscend(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = -0x8000;
}

View file

@ -300,7 +300,7 @@ static void sub_65D04(DBloodActor* actor)
t1 += nAccel;
else
t1 += nAccel >> 2;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
}
@ -334,7 +334,7 @@ static void sub_65F44(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = -dz;
}
@ -369,7 +369,7 @@ static void sub_661E0(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = dz;
}

View file

@ -290,7 +290,7 @@ static void gargMoveDodgeUp(DBloodActor* actor)
else
t2 -= pDudeInfo->sideSpeed;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = -0x1d555;
}
@ -318,7 +318,7 @@ static void gargMoveDodgeDown(DBloodActor* actor)
else
t2 -= pDudeInfo->sideSpeed;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = 0x44444;
}
@ -542,7 +542,7 @@ static void gargMoveForward(DBloodActor* actor)
t1 += nAccel;
else
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
}
@ -574,7 +574,7 @@ static void gargMoveSlow(DBloodActor* actor)
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 = nAccel >> 1;
t2 >>= 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
switch (actor->spr.type) {
case kDudeGargoyleFlesh:
@ -613,7 +613,7 @@ static void gargMoveSwoop(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
switch (actor->spr.type) {
case kDudeGargoyleFlesh:
@ -652,7 +652,7 @@ static void gargMoveFly(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
switch (actor->spr.type) {
case kDudeGargoyleFlesh:

View file

@ -269,7 +269,7 @@ static void ghostMoveDodgeUp(DBloodActor* actor)
else
t2 -= pDudeInfo->sideSpeed;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = -0x1d555;
}
@ -297,7 +297,7 @@ static void ghostMoveDodgeDown(DBloodActor* actor)
else
t2 -= pDudeInfo->sideSpeed;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = 0x44444;
}
@ -438,7 +438,7 @@ static void ghostMoveForward(DBloodActor* actor)
t1 += nAccel;
else
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
}
@ -470,7 +470,7 @@ static void ghostMoveSlow(DBloodActor* actor)
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 = nAccel >> 1;
t2 >>= 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
switch (actor->spr.type) {
case kDudePhantasm:
@ -506,7 +506,7 @@ static void ghostMoveSwoop(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
switch (actor->spr.type) {
case kDudePhantasm:
@ -542,7 +542,7 @@ static void ghostMoveFly(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
switch (actor->spr.type) {
case kDudePhantasm:

View file

@ -287,7 +287,7 @@ static void sub_6CB00(DBloodActor* actor)
t1 += nAccel;
else
t1 += nAccel >> 2;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
}
@ -320,7 +320,7 @@ static void sub_6CD74(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = -dz;
}
@ -354,7 +354,7 @@ static void sub_6D03C(DBloodActor* actor)
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
actor->__int_vel.Z = dz;
}

View file

@ -121,7 +121,7 @@ void SpidJumpSeqCallback(int, DBloodActor* actor)
case kDudeSpiderBrown:
case kDudeSpiderRed:
case kDudeSpiderBlack:
actor->__int_vel.X = IntToFixed(dx);
actor->set_int_bvel_x(IntToFixed(dx));
actor->__int_vel.Y = IntToFixed(dy);
actor->__int_vel.Z = IntToFixed(dz);
break;

View file

@ -1136,7 +1136,7 @@ void aiGenDudeMoveForward(DBloodActor* actor)
t1 += nAccel;
else
t1 += nAccel >> 1;
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
}
else

View file

@ -53,7 +53,7 @@ void fxFlameLick(DBloodActor* actor, sectortype*) // 0
auto pFX = gFX.fxSpawnActor(FX_32, actor->sector(), x, y, z, 0);
if (pFX)
{
pFX->__int_vel.X = actor->int_vel().X + Random2(-dx);
pFX->set_int_bvel_x(actor->int_vel().X + Random2(-dx));
pFX->__int_vel.Y = actor->int_vel().Y + Random2(-dy);
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
}
@ -128,7 +128,7 @@ void fxFlareSpark(DBloodActor* actor, sectortype*) // 3
auto pFX = gFX.fxSpawnActor(FX_28, actor->sector(), actor->spr.pos, 0);
if (pFX)
{
pFX->__int_vel.X = actor->int_vel().X + Random2(0x1aaaa);
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
}
@ -147,7 +147,7 @@ void fxFlareSparkLite(DBloodActor* actor, sectortype*) // 4
auto pFX = gFX.fxSpawnActor(FX_28, actor->sector(), actor->spr.pos, 0);
if (pFX)
{
pFX->__int_vel.X = actor->int_vel().X + Random2(0x1aaaa);
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
}
@ -169,7 +169,7 @@ void fxZombieBloodSpurt(DBloodActor* actor, sectortype*) // 5
auto pFX = gFX.fxSpawnActor(FX_27, actor->sector(), DVector3(actor->spr.pos.XY(), top), 0);
if (pFX)
{
pFX->__int_vel.X = actor->int_vel().X + Random2(0x11111);
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x11111));
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x11111);
pFX->__int_vel.Z = actor->int_vel().Z - 0x6aaaa;
}
@ -199,7 +199,7 @@ void fxBloodSpurt(DBloodActor* actor, sectortype*) // 6
if (pFX)
{
pFX->set_int_ang(0);
pFX->__int_vel.X = actor->int_vel().X >> 8;
pFX->set_int_bvel_x(actor->int_vel().X >> 8);
pFX->__int_vel.Y = actor->int_vel().Y >> 8;
pFX->__int_vel.Z = actor->int_vel().Z >> 8;
}
@ -218,7 +218,7 @@ void fxArcSpark(DBloodActor* actor, sectortype*) // 7
auto pFX = gFX.fxSpawnActor(FX_15, actor->sector(), actor->spr.pos, 0);
if (pFX)
{
pFX->__int_vel.X = actor->int_vel().X + Random2(0x10000);
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x10000));
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x10000);
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
}
@ -243,9 +243,9 @@ void fxDynPuff(DBloodActor* actor, sectortype*) // 8
auto pFX = gFX.fxSpawnActor(FX_7, actor->sector(), x, y, z, 0);
if (pFX)
{
pFX->__int_vel.X = actor->__int_vel.X;
pFX->__int_vel.Y = actor->__int_vel.Y;
pFX->__int_vel.Z = actor->__int_vel.Z;
pFX->set_int_bvel_x(actor->int_vel().X);
pFX->__int_vel.Y = actor->int_vel().Y;
pFX->__int_vel.Z = actor->int_vel().Z;
}
}
evPostActor(actor, 12, kCallbackFXDynPuff);
@ -367,7 +367,7 @@ void PlayerBubble(DBloodActor* actor, sectortype*) // 10
auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), x, y, z, 0);
if (pFX)
{
pFX->__int_vel.X = actor->int_vel().X + Random2(0x1aaaa);
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
pFX->__int_vel.Z = actor->int_vel().Z + Random2(0x1aaaa);
}
@ -397,7 +397,7 @@ void EnemyBubble(DBloodActor* actor, sectortype*) // 11
auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), x, y, z, 0);
if (pFX)
{
pFX->__int_vel.X = actor->int_vel().X + Random2(0x1aaaa);
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
pFX->__int_vel.Z = actor->int_vel().Z + Random2(0x1aaaa);
}
@ -494,7 +494,7 @@ void fxTeslaAlt(DBloodActor* actor, sectortype*) // 15
auto pFX = gFX.fxSpawnActor(FX_49, actor->sector(), actor->spr.pos, 0);
if (pFX)
{
pFX->__int_vel.X = actor->int_vel().X + Random2(0x1aaaa);
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
}
@ -626,7 +626,7 @@ void fxPodBloodSpray(DBloodActor* actor, sectortype*) // 18
if (pFX)
{
pFX->set_int_ang(0);
pFX->__int_vel.X = actor->int_vel().X >> 8;
pFX->set_int_bvel_x(actor->int_vel().X >> 8);
pFX->__int_vel.Y = actor->int_vel().Y >> 8;
pFX->__int_vel.Z = actor->int_vel().Z >> 8;
}

View file

@ -283,7 +283,7 @@ void fxSpawnBlood(DBloodActor* actor, int)
if (bloodactor)
{
bloodactor->set_int_ang(1024);
bloodactor->__int_vel.X = Random2(0x6aaaa);
bloodactor->set_int_bvel_x(Random2(0x6aaaa));
bloodactor->__int_vel.Y = Random2(0x6aaaa);
bloodactor->__int_vel.Z = -(int)Random(0x10aaaa) - 100;
evPostActor(bloodactor, 8, kCallbackFXBloodSpurt);
@ -313,7 +313,7 @@ void fxSpawnPodStuff(DBloodActor* actor, int)
if (spawnactor)
{
spawnactor->set_int_ang(1024);
spawnactor->__int_vel.X = Random2(0x6aaaa);
spawnactor->set_int_bvel_x(Random2(0x6aaaa));
spawnactor->__int_vel.Y = Random2(0x6aaaa);
spawnactor->__int_vel.Z = -(int)Random(0x10aaaa) - 100;
evPostActor(spawnactor, 8, kCallbackFXPodBloodSpray);
@ -339,7 +339,7 @@ void fxSpawnEjectingBrass(DBloodActor* actor, int z, int a3, int a4)
pBrass->set_int_ang(Random(2047));
int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120);
int nAngle = actor->int_ang() + Random2(56) + 512;
pBrass->__int_vel.X = MulScale(nDist, Cos(nAngle), 30);
pBrass->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30));
pBrass->__int_vel.Y = MulScale(nDist, Sin(nAngle), 30);
pBrass->__int_vel.Z = actor->int_vel().Z - (0x20000 + (Random2(40) << 18) / 120);
}
@ -364,7 +364,7 @@ void fxSpawnEjectingShell(DBloodActor* actor, int z, int a3, int a4)
pShell->set_int_ang(Random(2047));
int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120);
int nAngle = actor->int_ang() + Random2(56) + 512;
pShell->__int_vel.X = MulScale(nDist, Cos(nAngle), 30);
pShell->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30));
pShell->__int_vel.Y = MulScale(nDist, Sin(nAngle), 30);
pShell->__int_vel.Z = actor->int_vel().Z - (0x20000 + (Random2(20) << 18) / 120);
}

View file

@ -300,13 +300,13 @@ void GibFX(DBloodActor* actor, GIBFX* pGFX, DVector3* pPos, CGibVelocity* pVel)
pFX->spr.pal = actor->spr.pal;
if (pVel)
{
pFX->__int_vel.X = pVel->vx + Random2(pGFX->atd);
pFX->set_int_bvel_x(pVel->vx + Random2(pGFX->atd));
pFX->__int_vel.Y = pVel->vy + Random2(pGFX->atd);
pFX->__int_vel.Z = pVel->vz - Random(pGFX->at11);
}
else
{
pFX->__int_vel.X = Random2((pGFX->atd << 18) / 120);
pFX->set_int_bvel_x(Random2((pGFX->atd << 18) / 120));
pFX->__int_vel.Y = Random2((pGFX->atd << 18) / 120);
switch (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK)
{
@ -381,13 +381,13 @@ void GibThing(DBloodActor* actor, GIBTHING* pGThing, DVector3* pPos, CGibVelocit
gibactor->spr.picnum = pGThing->Kills;
if (pVel)
{
gibactor->__int_vel.X = pVel->vx + Random2(pGThing->atc);
gibactor->set_int_bvel_x(pVel->vx + Random2(pGThing->atc));
gibactor->__int_vel.Y = pVel->vy + Random2(pGThing->atc);
gibactor->__int_vel.Z = pVel->vz - Random(pGThing->at10);
}
else
{
gibactor->__int_vel.X = Random2((pGThing->atc << 18) / 120);
gibactor->set_int_bvel_x(Random2((pGThing->atc << 18) / 120));
gibactor->__int_vel.Y = Random2((pGThing->atc << 18) / 120);
switch (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK)
{
@ -464,13 +464,13 @@ void GibFX(walltype* pWall, GIBFX* pGFX, int a3, int a4, int a5, int a6, CGibVel
pGib->spr.pal = pWall->pal;
if (!pVel)
{
pGib->__int_vel.X = Random2((pGFX->atd << 18) / 120);
pGib->set_int_bvel_x(Random2((pGFX->atd << 18) / 120));
pGib->__int_vel.Y = Random2((pGFX->atd << 18) / 120);
pGib->__int_vel.Z = -(int)Random((pGFX->at11 << 18) / 120);
}
else
{
pGib->__int_vel.X = Random2((pVel->vx << 18) / 120);
pGib->set_int_bvel_x(Random2((pVel->vx << 18) / 120));
pGib->__int_vel.Y = Random2((pVel->vy << 18) / 120);
pGib->__int_vel.Z = -(int)Random((pVel->vz << 18) / 120);
}

View file

@ -1616,7 +1616,7 @@ void debrisBubble(DBloodActor* actor)
int z = bottom - Random(bottom - top);
auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), x, y, z, 0);
if (pFX) {
pFX->__int_vel.X = actor->int_vel().X + Random2(0x1aaaa);
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
pFX->__int_vel.Z = actor->int_vel().Z + Random2(0x1aaaa);
}
@ -1804,7 +1804,7 @@ void debrisMove(int listIndex)
for (i = 0; i < 7; i++)
{
if ((pFX2 = gFX.fxSpawnActor(FX_14, pFX->sector(), pFX->spr.pos, 0)) == NULL) continue;
pFX2->__int_vel.X = Random2(0x6aaaa);
pFX2->set_int_bvel_x(Random2(0x6aaaa));
pFX2->__int_vel.Y = Random2(0x6aaaa);
pFX2->__int_vel.Z = -(int)Random(0xd5555);
}
@ -3124,7 +3124,7 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi
}
else
{
pSprite->__int_vel.X = xv;
pSprite->set_int_bvel_x(xv);
pSprite->__int_vel.Y = yv;
pSprite->__int_vel.Z = zv;
}
@ -6568,7 +6568,7 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor)
if (sourceactor->xspr.data2 > 0)
{
int velocity = sourceactor->xspr.data2 << 12;
missileactor->__int_vel.X = MulScale(velocity, dx, 14);
missileactor->set_int_bvel_x(MulScale(velocity, dx, 14));
missileactor->__int_vel.Y = MulScale(velocity, dy, 14);
missileactor->__int_vel.Z = MulScale(velocity, dz, 14);
}
@ -8191,7 +8191,7 @@ void aiPatrolMove(DBloodActor* actor)
if (abs(nAng) > goalAng || ((targetactor->xspr.waitTime > 0 || targetactor->xspr.data1 == targetactor->xspr.data2) && aiPatrolMarkerReached(actor)))
{
actor->__int_vel.X = 0;
actor->set_int_bvel_x(0);
actor->__int_vel.Y = 0;
return;
}
@ -8228,7 +8228,7 @@ void aiPatrolMove(DBloodActor* actor)
}
vel = MulScale(vel, approxDist(dx, dy) << 6, 16);
actor->__int_vel.X = ClipRange(actor->int_vel().X, -vel, vel);
actor->set_int_bvel_x(ClipRange(actor->int_vel().X, -vel, vel));
actor->__int_vel.Y = ClipRange(actor->int_vel().Y, -vel, vel);
}

View file

@ -1764,7 +1764,7 @@ void ProcessInput(PLAYER* pPlayer)
spawned->set_int_ang((pPlayer->actor->int_ang() + 1024) & 2047);
int x = bcos(pPlayer->actor->int_ang());
int y = bsin(pPlayer->actor->int_ang());
spawned->__int_vel.X = pPlayer->actor->int_vel().X + MulScale(0x155555, x, 14);
spawned->set_int_bvel_x(pPlayer->actor->int_vel().X + MulScale(0x155555, x, 14));
spawned->__int_vel.Y = pPlayer->actor->int_vel().Y + MulScale(0x155555, y, 14);
spawned->__int_vel.Z = pPlayer->actor->__int_vel.Z;
}