mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- set_int_bvel_y
This commit is contained in:
parent
761da2b06e
commit
9cbffc998e
16 changed files with 70 additions and 71 deletions
|
@ -4092,7 +4092,7 @@ static void actKickObject(DBloodActor* kicker, DBloodActor* kicked)
|
|||
{
|
||||
int nSpeed = ClipLow(approxDist(kicker->int_vel().X, kicker->int_vel().Y) * 2, 0xaaaaa);
|
||||
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->set_int_bvel_y(MulScale(nSpeed, Sin(kicker->int_ang() + Random2(85)), 30));
|
||||
kicked->__int_vel.Z = MulScale(nSpeed, -0x2000, 14);
|
||||
kicked->spr.flags = 7;
|
||||
}
|
||||
|
@ -4593,7 +4593,7 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
RotateVector(&v2c, &v24, v30);
|
||||
RotateVector(&v28, &v24, v34);
|
||||
fxActor->set_int_bvel_x(actor->int_vel().X + v2c);
|
||||
fxActor->__int_vel.Y = actor->int_vel().Y + v28;
|
||||
fxActor->set_int_bvel_y(actor->int_vel().Y + v28);
|
||||
fxActor->__int_vel.Z = actor->int_vel().Z + v24;
|
||||
}
|
||||
}
|
||||
|
@ -4664,7 +4664,7 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
if (actor->__int_vel.Z < 0)
|
||||
{
|
||||
actor->set_int_bvel_x(MulScale(actor->int_vel().X, 0xc000, 16));
|
||||
actor->__int_vel.Y = MulScale(actor->int_vel().Y, 0xc000, 16);
|
||||
actor->set_int_bvel_y(MulScale(actor->int_vel().Y, 0xc000, 16));
|
||||
actor->__int_vel.Z = MulScale(-actor->int_vel().Z, 0x4000, 16);
|
||||
|
||||
switch (actor->spr.type)
|
||||
|
@ -5139,7 +5139,7 @@ void MoveDude(DBloodActor* actor)
|
|||
if (pFX2)
|
||||
{
|
||||
pFX2->set_int_bvel_x(Random2(0x6aaaa));
|
||||
pFX2->__int_vel.Y = Random2(0x6aaaa);
|
||||
pFX2->set_int_bvel_y(Random2(0x6aaaa));
|
||||
pFX2->__int_vel.Z = -(int)Random(0xd5555);
|
||||
}
|
||||
}
|
||||
|
@ -5233,7 +5233,7 @@ int MoveMissile(DBloodActor* actor)
|
|||
int vy = 0;
|
||||
RotatePoint(&vx, &vy, (nTargetAngle + 1536) & 2047, 0, 0);
|
||||
actor->set_int_bvel_x(vx);
|
||||
actor->__int_vel.Y = vy;
|
||||
actor->set_int_bvel_y(vy);
|
||||
int dz = target->int_pos().Z - actor->int_pos().Z;
|
||||
|
||||
int deltaz = dz / 10;
|
||||
|
@ -5946,7 +5946,7 @@ static void actCheckTraps()
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(dx + Random2(0x8888));
|
||||
pFX->__int_vel.Y = dy + Random2(0x8888);
|
||||
pFX->set_int_bvel_y(dy + Random2(0x8888));
|
||||
pFX->__int_vel.Z = Random2(0x8888);
|
||||
}
|
||||
x += (dx / 2) >> 12;
|
||||
|
@ -6401,7 +6401,7 @@ DBloodActor* actFireThing(DBloodActor* actor, int a2, int a3, int a4, int thingT
|
|||
fired->SetOwner(actor);
|
||||
fired->spr.angle = actor->spr.angle;
|
||||
fired->set_int_bvel_x(MulScale(a6, Cos(fired->int_ang()), 30));
|
||||
fired->__int_vel.Y = MulScale(a6, Sin(fired->int_ang()), 30);
|
||||
fired->set_int_bvel_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);
|
||||
fired->add_int_bvel_y(actor->int_vel().Y / 2);
|
||||
|
@ -6534,7 +6534,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, int a2, int a3, int a4, int a5,
|
|||
spawned->spr.picnum = pMissileInfo->picnum;
|
||||
spawned->set_int_ang((actor->int_ang() + pMissileInfo->angleOfs) & 2047);
|
||||
spawned->set_int_bvel_x(MulScale(pMissileInfo->velocity, a4, 14));
|
||||
spawned->__int_vel.Y = MulScale(pMissileInfo->velocity, a5, 14);
|
||||
spawned->set_int_bvel_y(MulScale(pMissileInfo->velocity, a5, 14));
|
||||
spawned->__int_vel.Z = MulScale(pMissileInfo->velocity, a6, 14);
|
||||
spawned->SetOwner(actor);
|
||||
spawned->spr.cstat |= CSTAT_SPRITE_BLOCK;
|
||||
|
|
|
@ -349,7 +349,7 @@ void aiMoveDodge(DBloodActor* actor)
|
|||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ static void batMoveDodgeUp(DBloodActor* actor)
|
|||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = -0x52aaa;
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ static void batMoveDodgeDown(DBloodActor* actor)
|
|||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
|
@ -330,7 +330,7 @@ static void batMoveForward(DBloodActor* actor)
|
|||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
}
|
||||
|
||||
static void batMoveSwoop(DBloodActor* actor)
|
||||
|
@ -358,7 +358,7 @@ static void batMoveSwoop(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
|
@ -387,7 +387,7 @@ static void batMoveFly(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = -0x2d555;
|
||||
}
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ static void sub_628A0(DBloodActor* actor)
|
|||
else
|
||||
t1 += nAccel >> 2;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
}
|
||||
|
||||
static void sub_62AE0(DBloodActor* actor)
|
||||
|
@ -466,7 +466,7 @@ static void sub_62AE0(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = -dz;
|
||||
}
|
||||
|
||||
|
@ -500,7 +500,7 @@ static void sub_62D7C(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = dz;
|
||||
}
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ static void eelMoveDodgeUp(DBloodActor* actor)
|
|||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = -0x8000;
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ static void eelMoveDodgeDown(DBloodActor* actor)
|
|||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
|
@ -342,7 +342,7 @@ static void eelMoveForward(DBloodActor* actor)
|
|||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
}
|
||||
|
||||
static void eelMoveSwoop(DBloodActor* actor)
|
||||
|
@ -367,7 +367,7 @@ static void eelMoveSwoop(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = 0x22222;
|
||||
}
|
||||
|
||||
|
@ -393,7 +393,7 @@ static void eelMoveAscend(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = -0x8000;
|
||||
}
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ static void sub_65D04(DBloodActor* actor)
|
|||
else
|
||||
t1 += nAccel >> 2;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
}
|
||||
|
||||
static void sub_65F44(DBloodActor* actor)
|
||||
|
@ -335,7 +335,7 @@ static void sub_65F44(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = -dz;
|
||||
}
|
||||
|
||||
|
@ -370,7 +370,7 @@ static void sub_661E0(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = dz;
|
||||
}
|
||||
|
||||
|
|
|
@ -291,7 +291,7 @@ static void gargMoveDodgeUp(DBloodActor* actor)
|
|||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = -0x1d555;
|
||||
}
|
||||
|
||||
|
@ -319,7 +319,7 @@ static void gargMoveDodgeDown(DBloodActor* actor)
|
|||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
|
@ -543,7 +543,7 @@ static void gargMoveForward(DBloodActor* actor)
|
|||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
}
|
||||
|
||||
static void gargMoveSlow(DBloodActor* actor)
|
||||
|
@ -575,7 +575,7 @@ static void gargMoveSlow(DBloodActor* actor)
|
|||
t1 = nAccel >> 1;
|
||||
t2 >>= 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
switch (actor->spr.type) {
|
||||
case kDudeGargoyleFlesh:
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
|
@ -614,7 +614,7 @@ static void gargMoveSwoop(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
switch (actor->spr.type) {
|
||||
case kDudeGargoyleFlesh:
|
||||
actor->__int_vel.Z = t1;
|
||||
|
@ -653,7 +653,7 @@ static void gargMoveFly(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
switch (actor->spr.type) {
|
||||
case kDudeGargoyleFlesh:
|
||||
actor->__int_vel.Z = -t1;
|
||||
|
|
|
@ -270,7 +270,7 @@ static void ghostMoveDodgeUp(DBloodActor* actor)
|
|||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = -0x1d555;
|
||||
}
|
||||
|
||||
|
@ -298,7 +298,7 @@ static void ghostMoveDodgeDown(DBloodActor* actor)
|
|||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
|
@ -439,7 +439,7 @@ static void ghostMoveForward(DBloodActor* actor)
|
|||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
}
|
||||
|
||||
static void ghostMoveSlow(DBloodActor* actor)
|
||||
|
@ -471,7 +471,7 @@ static void ghostMoveSlow(DBloodActor* actor)
|
|||
t1 = nAccel >> 1;
|
||||
t2 >>= 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
switch (actor->spr.type) {
|
||||
case kDudePhantasm:
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
|
@ -507,7 +507,7 @@ static void ghostMoveSwoop(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
switch (actor->spr.type) {
|
||||
case kDudePhantasm:
|
||||
actor->__int_vel.Z = t1;
|
||||
|
@ -543,7 +543,7 @@ static void ghostMoveFly(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
switch (actor->spr.type) {
|
||||
case kDudePhantasm:
|
||||
actor->__int_vel.Z = -t1;
|
||||
|
|
|
@ -288,7 +288,7 @@ static void sub_6CB00(DBloodActor* actor)
|
|||
else
|
||||
t1 += nAccel >> 2;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
}
|
||||
|
||||
static void sub_6CD74(DBloodActor* actor)
|
||||
|
@ -321,7 +321,7 @@ static void sub_6CD74(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = -dz;
|
||||
}
|
||||
|
||||
|
@ -355,7 +355,7 @@ static void sub_6D03C(DBloodActor* actor)
|
|||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
actor->__int_vel.Z = dz;
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ void SpidJumpSeqCallback(int, DBloodActor* actor)
|
|||
case kDudeSpiderRed:
|
||||
case kDudeSpiderBlack:
|
||||
actor->set_int_bvel_x(IntToFixed(dx));
|
||||
actor->__int_vel.Y = IntToFixed(dy);
|
||||
actor->set_int_bvel_y(IntToFixed(dy));
|
||||
actor->__int_vel.Z = IntToFixed(dz);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1137,7 +1137,7 @@ void aiGenDudeMoveForward(DBloodActor* actor)
|
|||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->set_int_bvel_x(DMulScale(t1, nCos, t2, nSin, 30));
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->set_int_bvel_y(DMulScale(t1, nSin, -t2, nCos, 30));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ void fxFlameLick(DBloodActor* actor, sectortype*) // 0
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(actor->int_vel().X + Random2(-dx));
|
||||
pFX->__int_vel.Y = actor->int_vel().Y + Random2(-dy);
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y + Random2(-dy));
|
||||
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ void fxFlareSpark(DBloodActor* actor, sectortype*) // 3
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
|
||||
}
|
||||
evPostActor(actor, 4, kCallbackFXFlareSpark);
|
||||
|
@ -148,7 +148,7 @@ void fxFlareSparkLite(DBloodActor* actor, sectortype*) // 4
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
|
||||
}
|
||||
evPostActor(actor, 12, kCallbackFXFlareSparkLite);
|
||||
|
@ -170,7 +170,7 @@ void fxZombieBloodSpurt(DBloodActor* actor, sectortype*) // 5
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x11111));
|
||||
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x11111);
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x11111));
|
||||
pFX->__int_vel.Z = actor->int_vel().Z - 0x6aaaa;
|
||||
}
|
||||
if (actor->xspr.data1 > 0)
|
||||
|
@ -200,7 +200,7 @@ void fxBloodSpurt(DBloodActor* actor, sectortype*) // 6
|
|||
{
|
||||
pFX->set_int_ang(0);
|
||||
pFX->set_int_bvel_x(actor->int_vel().X >> 8);
|
||||
pFX->__int_vel.Y = actor->int_vel().Y >> 8;
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y >> 8);
|
||||
pFX->__int_vel.Z = actor->int_vel().Z >> 8;
|
||||
}
|
||||
evPostActor(actor, 6, kCallbackFXBloodSpurt);
|
||||
|
@ -219,7 +219,7 @@ void fxArcSpark(DBloodActor* actor, sectortype*) // 7
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x10000));
|
||||
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x10000);
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x10000));
|
||||
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
|
||||
}
|
||||
evPostActor(actor, 3, kCallbackFXArcSpark);
|
||||
|
@ -244,7 +244,7 @@ void fxDynPuff(DBloodActor* actor, sectortype*) // 8
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(actor->int_vel().X);
|
||||
pFX->__int_vel.Y = actor->int_vel().Y;
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y);
|
||||
pFX->__int_vel.Z = actor->int_vel().Z;
|
||||
}
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ void PlayerBubble(DBloodActor* actor, sectortype*) // 10
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Z = actor->int_vel().Z + Random2(0x1aaaa);
|
||||
}
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ void EnemyBubble(DBloodActor* actor, sectortype*) // 11
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Z = actor->int_vel().Z + Random2(0x1aaaa);
|
||||
}
|
||||
}
|
||||
|
@ -495,7 +495,7 @@ void fxTeslaAlt(DBloodActor* actor, sectortype*) // 15
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Z = actor->int_vel().Z - Random(0x1aaaa);
|
||||
}
|
||||
evPostActor(actor, 3, kCallbackFXTeslaAlt);
|
||||
|
@ -627,7 +627,7 @@ void fxPodBloodSpray(DBloodActor* actor, sectortype*) // 18
|
|||
{
|
||||
pFX->set_int_ang(0);
|
||||
pFX->set_int_bvel_x(actor->int_vel().X >> 8);
|
||||
pFX->__int_vel.Y = actor->int_vel().Y >> 8;
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y >> 8);
|
||||
pFX->__int_vel.Z = actor->int_vel().Z >> 8;
|
||||
}
|
||||
evPostActor(actor, 6, kCallbackFXPodBloodSpray);
|
||||
|
|
|
@ -284,7 +284,7 @@ void fxSpawnBlood(DBloodActor* actor, int)
|
|||
{
|
||||
bloodactor->set_int_ang(1024);
|
||||
bloodactor->set_int_bvel_x(Random2(0x6aaaa));
|
||||
bloodactor->__int_vel.Y = Random2(0x6aaaa);
|
||||
bloodactor->set_int_bvel_y(Random2(0x6aaaa));
|
||||
bloodactor->__int_vel.Z = -(int)Random(0x10aaaa) - 100;
|
||||
evPostActor(bloodactor, 8, kCallbackFXBloodSpurt);
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ void fxSpawnPodStuff(DBloodActor* actor, int)
|
|||
{
|
||||
spawnactor->set_int_ang(1024);
|
||||
spawnactor->set_int_bvel_x(Random2(0x6aaaa));
|
||||
spawnactor->__int_vel.Y = Random2(0x6aaaa);
|
||||
spawnactor->set_int_bvel_y(Random2(0x6aaaa));
|
||||
spawnactor->__int_vel.Z = -(int)Random(0x10aaaa) - 100;
|
||||
evPostActor(spawnactor, 8, kCallbackFXPodBloodSpray);
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ void fxSpawnEjectingBrass(DBloodActor* actor, int z, int a3, int a4)
|
|||
int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120);
|
||||
int nAngle = actor->int_ang() + Random2(56) + 512;
|
||||
pBrass->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30));
|
||||
pBrass->__int_vel.Y = MulScale(nDist, Sin(nAngle), 30);
|
||||
pBrass->set_int_bvel_y(MulScale(nDist, Sin(nAngle), 30));
|
||||
pBrass->__int_vel.Z = actor->int_vel().Z - (0x20000 + (Random2(40) << 18) / 120);
|
||||
}
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ void fxSpawnEjectingShell(DBloodActor* actor, int z, int a3, int a4)
|
|||
int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120);
|
||||
int nAngle = actor->int_ang() + Random2(56) + 512;
|
||||
pShell->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30));
|
||||
pShell->__int_vel.Y = MulScale(nDist, Sin(nAngle), 30);
|
||||
pShell->set_int_bvel_y(MulScale(nDist, Sin(nAngle), 30));
|
||||
pShell->__int_vel.Z = actor->int_vel().Z - (0x20000 + (Random2(20) << 18) / 120);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -301,13 +301,13 @@ void GibFX(DBloodActor* actor, GIBFX* pGFX, DVector3* pPos, CGibVelocity* pVel)
|
|||
if (pVel)
|
||||
{
|
||||
pFX->set_int_bvel_x(pVel->vx + Random2(pGFX->atd));
|
||||
pFX->__int_vel.Y = pVel->vy + Random2(pGFX->atd);
|
||||
pFX->set_int_bvel_y(pVel->vy + Random2(pGFX->atd));
|
||||
pFX->__int_vel.Z = pVel->vz - Random(pGFX->at11);
|
||||
}
|
||||
else
|
||||
{
|
||||
pFX->set_int_bvel_x(Random2((pGFX->atd << 18) / 120));
|
||||
pFX->__int_vel.Y = Random2((pGFX->atd << 18) / 120);
|
||||
pFX->set_int_bvel_y(Random2((pGFX->atd << 18) / 120));
|
||||
switch (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK)
|
||||
{
|
||||
case 16:
|
||||
|
@ -382,13 +382,13 @@ void GibThing(DBloodActor* actor, GIBTHING* pGThing, DVector3* pPos, CGibVelocit
|
|||
if (pVel)
|
||||
{
|
||||
gibactor->set_int_bvel_x(pVel->vx + Random2(pGThing->atc));
|
||||
gibactor->__int_vel.Y = pVel->vy + Random2(pGThing->atc);
|
||||
gibactor->set_int_bvel_y(pVel->vy + Random2(pGThing->atc));
|
||||
gibactor->__int_vel.Z = pVel->vz - Random(pGThing->at10);
|
||||
}
|
||||
else
|
||||
{
|
||||
gibactor->set_int_bvel_x(Random2((pGThing->atc << 18) / 120));
|
||||
gibactor->__int_vel.Y = Random2((pGThing->atc << 18) / 120);
|
||||
gibactor->set_int_bvel_y(Random2((pGThing->atc << 18) / 120));
|
||||
switch (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK)
|
||||
{
|
||||
case 16:
|
||||
|
@ -465,13 +465,13 @@ void GibFX(walltype* pWall, GIBFX* pGFX, int a3, int a4, int a5, int a6, CGibVel
|
|||
if (!pVel)
|
||||
{
|
||||
pGib->set_int_bvel_x(Random2((pGFX->atd << 18) / 120));
|
||||
pGib->__int_vel.Y = Random2((pGFX->atd << 18) / 120);
|
||||
pGib->set_int_bvel_y(Random2((pGFX->atd << 18) / 120));
|
||||
pGib->__int_vel.Z = -(int)Random((pGFX->at11 << 18) / 120);
|
||||
}
|
||||
else
|
||||
{
|
||||
pGib->set_int_bvel_x(Random2((pVel->vx << 18) / 120));
|
||||
pGib->__int_vel.Y = Random2((pVel->vy << 18) / 120);
|
||||
pGib->set_int_bvel_y(Random2((pVel->vy << 18) / 120));
|
||||
pGib->__int_vel.Z = -(int)Random((pVel->vz << 18) / 120);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1617,7 +1617,7 @@ void debrisBubble(DBloodActor* actor)
|
|||
auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), x, y, z, 0);
|
||||
if (pFX) {
|
||||
pFX->set_int_bvel_x(actor->int_vel().X + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Y = actor->int_vel().Y + Random2(0x1aaaa);
|
||||
pFX->set_int_bvel_y(actor->int_vel().Y + Random2(0x1aaaa));
|
||||
pFX->__int_vel.Z = actor->int_vel().Z + Random2(0x1aaaa);
|
||||
}
|
||||
|
||||
|
@ -1805,7 +1805,7 @@ void debrisMove(int listIndex)
|
|||
{
|
||||
if ((pFX2 = gFX.fxSpawnActor(FX_14, pFX->sector(), pFX->spr.pos, 0)) == NULL) continue;
|
||||
pFX2->set_int_bvel_x(Random2(0x6aaaa));
|
||||
pFX2->__int_vel.Y = Random2(0x6aaaa);
|
||||
pFX2->set_int_bvel_y(Random2(0x6aaaa));
|
||||
pFX2->__int_vel.Z = -(int)Random(0xd5555);
|
||||
}
|
||||
break;
|
||||
|
@ -3125,7 +3125,7 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi
|
|||
else
|
||||
{
|
||||
pSprite->set_int_bvel_x(xv);
|
||||
pSprite->__int_vel.Y = yv;
|
||||
pSprite->set_int_bvel_y(yv);
|
||||
pSprite->__int_vel.Z = zv;
|
||||
}
|
||||
|
||||
|
@ -6569,7 +6569,7 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
{
|
||||
int velocity = sourceactor->xspr.data2 << 12;
|
||||
missileactor->set_int_bvel_x(MulScale(velocity, dx, 14));
|
||||
missileactor->__int_vel.Y = MulScale(velocity, dy, 14);
|
||||
missileactor->set_int_bvel_y(MulScale(velocity, dy, 14));
|
||||
missileactor->__int_vel.Z = MulScale(velocity, dz, 14);
|
||||
}
|
||||
|
||||
|
@ -8191,8 +8191,7 @@ void aiPatrolMove(DBloodActor* actor)
|
|||
|
||||
if (abs(nAng) > goalAng || ((targetactor->xspr.waitTime > 0 || targetactor->xspr.data1 == targetactor->xspr.data2) && aiPatrolMarkerReached(actor)))
|
||||
{
|
||||
actor->set_int_bvel_x(0);
|
||||
actor->__int_vel.Y = 0;
|
||||
actor->clear_vel_xy();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -8229,7 +8228,7 @@ void aiPatrolMove(DBloodActor* actor)
|
|||
|
||||
vel = MulScale(vel, approxDist(dx, dy) << 6, 16);
|
||||
actor->set_int_bvel_x(ClipRange(actor->int_vel().X, -vel, vel));
|
||||
actor->__int_vel.Y = ClipRange(actor->int_vel().Y, -vel, vel);
|
||||
actor->set_int_bvel_y(ClipRange(actor->int_vel().Y, -vel, vel));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -1765,7 +1765,7 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
int x = bcos(pPlayer->actor->int_ang());
|
||||
int y = bsin(pPlayer->actor->int_ang());
|
||||
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->set_int_bvel_y(pPlayer->actor->int_vel().Y + MulScale(0x155555, y, 14));
|
||||
spawned->__int_vel.Z = pPlayer->actor->__int_vel.Z;
|
||||
}
|
||||
pPlayer->hand = 0;
|
||||
|
|
Loading…
Reference in a new issue