mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- renamed vel.
This commit is contained in:
parent
cb81a50752
commit
e7b09dbaac
25 changed files with 539 additions and 539 deletions
|
@ -45,7 +45,7 @@ public:
|
|||
DVector3 opos;
|
||||
int time;
|
||||
DAngle oang;
|
||||
vec3_t vel;
|
||||
vec3_t __int_vel;
|
||||
|
||||
int16_t spritesetindex;
|
||||
|
||||
|
@ -213,42 +213,42 @@ public:
|
|||
|
||||
DVector3 fVel() const
|
||||
{
|
||||
return { FixedToFloat(vel.X), FixedToFloat(vel.Y), FixedToFloat(vel.Z) };
|
||||
return { FixedToFloat(__int_vel.X), FixedToFloat(__int_vel.Y), FixedToFloat(__int_vel.Z) };
|
||||
}
|
||||
|
||||
vec3_t int_vel() const
|
||||
{
|
||||
return vel;
|
||||
return __int_vel;
|
||||
}
|
||||
|
||||
void set_int_bvel_x(int x)
|
||||
{
|
||||
vel.X = x;
|
||||
__int_vel.X = x;
|
||||
}
|
||||
|
||||
void set_int_bvel_y(int x)
|
||||
{
|
||||
vel.Y = x;
|
||||
__int_vel.Y = x;
|
||||
}
|
||||
|
||||
void set_int_bvel_z(int x)
|
||||
{
|
||||
vel.Z = x;
|
||||
__int_vel.Z = x;
|
||||
}
|
||||
|
||||
void add_int_bvel_x(int x)
|
||||
{
|
||||
vel.X += x;
|
||||
__int_vel.X += x;
|
||||
}
|
||||
|
||||
void add_int_bvel_y(int x)
|
||||
{
|
||||
vel.Y += x;
|
||||
__int_vel.Y += x;
|
||||
}
|
||||
|
||||
void add_int_bvel_z(int x)
|
||||
{
|
||||
vel.Z += x;
|
||||
__int_vel.Z += x;
|
||||
}
|
||||
|
||||
// Same as above but with inverted y and z axes to match the renderer's coordinate system.
|
||||
|
|
|
@ -678,9 +678,9 @@ void DCoreActor::Serialize(FSerializer& arc)
|
|||
("time", time)
|
||||
("spritesetindex", spritesetindex)
|
||||
("spriteext", sprext)
|
||||
("xvel", vel.X)
|
||||
("yvel", vel.Y)
|
||||
("zvel", vel.Z);
|
||||
("xvel", __int_vel.X)
|
||||
("yvel", __int_vel.Y)
|
||||
("zvel", __int_vel.Z);
|
||||
|
||||
if (arc.isReading()) spsmooth = {};
|
||||
}
|
||||
|
|
|
@ -2575,9 +2575,9 @@ static void ConcussSprite(DBloodActor* source, DBloodActor* actor, const DVector
|
|||
{
|
||||
int size = (tileWidth(actor->spr.picnum) * actor->spr.xrepeat * tileHeight(actor->spr.picnum) * actor->spr.yrepeat) >> 1;
|
||||
int t = Scale(damage, size, mass);
|
||||
actor->vel.X += (int)MulScaleF(t, vect.X, 12);
|
||||
actor->vel.Y += (int)MulScaleF(t, vect.Y, 12);
|
||||
actor->vel.Z += (int)MulScaleF(t, vect.Z, 12);
|
||||
actor->__int_vel.X += (int)MulScaleF(t, vect.X, 12);
|
||||
actor->__int_vel.Y += (int)MulScaleF(t, vect.Y, 12);
|
||||
actor->__int_vel.Z += (int)MulScaleF(t, vect.Z, 12);
|
||||
}
|
||||
}
|
||||
actDamageSprite(source, actor, kDamageExplode, damage);
|
||||
|
@ -2950,7 +2950,7 @@ static bool actKillModernDude(DBloodActor* actor, DAMAGE_TYPE damageType)
|
|||
actDropObject(actor, actor->xspr.dropMsg);
|
||||
|
||||
actor->spr.flags &= ~kPhysMove;
|
||||
actor->vel.X = actor->vel.Y = 0;
|
||||
actor->__int_vel.X = actor->__int_vel.Y = 0;
|
||||
|
||||
playGenDudeSound(actor, kGenDudeSndTransforming);
|
||||
int seqId = actor->xspr.data2 + kGenDudeSeqTransform;
|
||||
|
@ -2977,7 +2977,7 @@ static bool actKillModernDude(DBloodActor* actor, DAMAGE_TYPE damageType)
|
|||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
DVector3 gibPos(actor->spr.pos.XY(), top);
|
||||
CGibVelocity gibVel(actor->vel.X >> 1, actor->vel.Y >> 1, -0xccccc);
|
||||
CGibVelocity gibVel(actor->__int_vel.X >> 1, actor->__int_vel.Y >> 1, -0xccccc);
|
||||
GibSprite(actor, nGibType, &gibPos, &gibVel);
|
||||
}
|
||||
}
|
||||
|
@ -3215,7 +3215,7 @@ static void spawnGibs(DBloodActor* actor, int type, int velz)
|
|||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
DVector3 gibPos(actor->spr.pos.XY(), top);
|
||||
CGibVelocity gibVel(actor->vel.X >> 1, actor->vel.Y >> 1, velz);
|
||||
CGibVelocity gibVel(actor->__int_vel.X >> 1, actor->__int_vel.Y >> 1, velz);
|
||||
GibSprite(actor, GIBTYPE_27, &gibPos, &gibVel);
|
||||
}
|
||||
|
||||
|
@ -4090,10 +4090,10 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
|
|||
|
||||
static void actKickObject(DBloodActor* kicker, DBloodActor* kicked)
|
||||
{
|
||||
int nSpeed = ClipLow(approxDist(kicker->vel.X, kicker->vel.Y) * 2, 0xaaaaa);
|
||||
kicked->vel.X = MulScale(nSpeed, Cos(kicker->int_ang() + Random2(85)), 30);
|
||||
kicked->vel.Y = MulScale(nSpeed, Sin(kicker->int_ang() + Random2(85)), 30);
|
||||
kicked->vel.Z = MulScale(nSpeed, -0x2000, 14);
|
||||
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->__int_vel.Y = MulScale(nSpeed, Sin(kicker->int_ang() + Random2(85)), 30);
|
||||
kicked->__int_vel.Z = MulScale(nSpeed, -0x2000, 14);
|
||||
kicked->spr.flags = 7;
|
||||
}
|
||||
|
||||
|
@ -4149,7 +4149,7 @@ static void checkCeilHit(DBloodActor* actor)
|
|||
auto actor2 = coll.actor();
|
||||
if (actor2 && actor2->hasX())
|
||||
{
|
||||
if ((actor2->spr.statnum == kStatThing || actor2->spr.statnum == kStatDude) && (actor->vel.X != 0 || actor->vel.Y != 0 || actor->vel.Z != 0))
|
||||
if ((actor2->spr.statnum == kStatThing || actor2->spr.statnum == kStatDude) && (actor->__int_vel.X != 0 || actor->__int_vel.Y != 0 || actor->__int_vel.Z != 0))
|
||||
{
|
||||
auto adelta = actor2->spr.pos - actor->spr.pos;
|
||||
if (actor2->spr.statnum == kStatThing)
|
||||
|
@ -4159,14 +4159,14 @@ static void checkCeilHit(DBloodActor* actor)
|
|||
if (pThingInfo->flags & 1) actor2->spr.flags |= 1;
|
||||
if (pThingInfo->flags & 2) actor2->spr.flags |= 4;
|
||||
// Inlined ?
|
||||
actor2->vel.X += int(adelta.X * 16);
|
||||
actor2->vel.Y += int(adelta.Y * 16);
|
||||
actor2->__int_vel.X += int(adelta.X * 16);
|
||||
actor2->__int_vel.Y += int(adelta.Y * 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
actor2->spr.flags |= 5;
|
||||
actor2->vel.X += int(adelta.X * 16);
|
||||
actor2->vel.Y += int(adelta.Y * 16);
|
||||
actor2->__int_vel.X += int(adelta.X * 16);
|
||||
actor2->__int_vel.Y += int(adelta.Y * 16);
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
// add size shroom abilities
|
||||
if ((actor->IsPlayerActor() && isShrinked(actor)) || (actor2->IsPlayerActor() && isGrown(actor2))) {
|
||||
|
@ -4257,7 +4257,7 @@ static void checkHit(DBloodActor* actor)
|
|||
// add size shroom abilities
|
||||
if ((actor2->IsPlayerActor() && isShrinked(actor2)) || (actor->IsPlayerActor() && isGrown(actor)))
|
||||
{
|
||||
if (actor->vel.X != 0 && actor2->IsDudeActor())
|
||||
if (actor->__int_vel.X != 0 && actor2->IsDudeActor())
|
||||
{
|
||||
int mass1 = getDudeInfo(actor->spr.type)->mass;
|
||||
int mass2 = getDudeInfo(actor2->spr.type)->mass;
|
||||
|
@ -4272,7 +4272,7 @@ static void checkHit(DBloodActor* actor)
|
|||
{
|
||||
actKickObject(actor, actor2);
|
||||
sfxPlay3DSound(actor, 357, -1, 1);
|
||||
int dmg = (mass1 - mass2) + abs(FixedToInt(actor->vel.X));
|
||||
int dmg = (mass1 - mass2) + abs(FixedToInt(actor->__int_vel.X));
|
||||
if (dmg > 0) actDamageSprite(actor, actor2, (Chance(0x2000)) ? kDamageFall : kDamageBullet, dmg);
|
||||
}
|
||||
}
|
||||
|
@ -4501,9 +4501,9 @@ void actAirDrag(DBloodActor* actor, int a2)
|
|||
wind_y = MulScale(wind, Sin(pXSector->windAng), 30);
|
||||
}
|
||||
}
|
||||
actor->vel.X += MulScale(wind_x - actor->vel.X, a2, 16);
|
||||
actor->vel.Y += MulScale(wind_y - actor->vel.Y, a2, 16);
|
||||
actor->vel.Z -= MulScale(actor->vel.Z, a2, 16);
|
||||
actor->__int_vel.X += MulScale(wind_x - actor->__int_vel.X, a2, 16);
|
||||
actor->__int_vel.Y += MulScale(wind_y - actor->__int_vel.Y, a2, 16);
|
||||
actor->__int_vel.Z -= MulScale(actor->__int_vel.Z, a2, 16);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -4525,13 +4525,13 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
lhit.setNone();
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
const int bakCompat = enginecompatibility_mode;
|
||||
if (actor->vel.X || actor->vel.Y)
|
||||
if (actor->__int_vel.X || actor->__int_vel.Y)
|
||||
{
|
||||
auto bakCstat = actor->spr.cstat;
|
||||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
if ((actor->GetOwner()) && !cl_bloodvanillaexplosions && !VanillaMode())
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_NONE; // improved clipmove accuracy
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.X >> 12, actor->vel.Y >> 12, actor->spr.clipdist << 2, (actor->int_pos().Z - top) / 4, (bottom - actor->int_pos().Z) / 4, CLIPMASK0, lhit);
|
||||
ClipMove(actor->spr.pos, &pSector, actor->__int_vel.X >> 12, actor->__int_vel.Y >> 12, actor->spr.clipdist << 2, (actor->int_pos().Z - top) / 4, (bottom - actor->int_pos().Z) / 4, CLIPMASK0, lhit);
|
||||
actor->hit.hit = lhit;
|
||||
enginecompatibility_mode = bakCompat; // restore
|
||||
actor->spr.cstat = bakCstat;
|
||||
|
@ -4545,7 +4545,7 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
auto& coll = actor->hit.hit;
|
||||
if (coll.type == kHitWall)
|
||||
{
|
||||
actWallBounceVector(&actor->vel.X, &actor->vel.Y, coll.hitWall, pThingInfo->elastic);
|
||||
actWallBounceVector(&actor->__int_vel.X, &actor->__int_vel.Y, coll.hitWall, pThingInfo->elastic);
|
||||
switch (actor->spr.type)
|
||||
{
|
||||
case kThingZombieHead:
|
||||
|
@ -4567,7 +4567,7 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
if (pSector2) pSector = pSector2;
|
||||
}
|
||||
|
||||
actor->add_int_z(actor->vel.Z >> 8);
|
||||
actor->add_int_z(actor->__int_vel.Z >> 8);
|
||||
|
||||
int ceilZ, floorZ;
|
||||
Collision ceilColl, floorColl;
|
||||
|
@ -4577,7 +4577,7 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
if ((actor->spr.flags & 2) && bottom < floorZ)
|
||||
{
|
||||
actor->spr.pos.Z += 1.777;
|
||||
actor->vel.Z += 58254;
|
||||
actor->__int_vel.Z += 58254;
|
||||
if (actor->spr.type == kThingZombieHead)
|
||||
{
|
||||
auto* fxActor = gFX.fxSpawnActor(FX_27, actor->sector(), actor->spr.pos, 0);
|
||||
|
@ -4592,9 +4592,9 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
RotateVector(&v2c, &v28, vbx);
|
||||
RotateVector(&v2c, &v24, v30);
|
||||
RotateVector(&v28, &v24, v34);
|
||||
fxActor->vel.X = actor->vel.X + v2c;
|
||||
fxActor->vel.Y = actor->vel.Y + v28;
|
||||
fxActor->vel.Z = actor->vel.Z + v24;
|
||||
fxActor->__int_vel.X = actor->__int_vel.X + v2c;
|
||||
fxActor->__int_vel.Y = actor->__int_vel.Y + v28;
|
||||
fxActor->__int_vel.Z = actor->__int_vel.Z + v24;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4607,30 +4607,30 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
actor->hit.florhit = floorColl;
|
||||
actor->add_int_z(floorZ - bottom);
|
||||
|
||||
int v20 = actor->vel.Z - actor->sector()->velFloor;
|
||||
int v20 = actor->__int_vel.Z - actor->sector()->velFloor;
|
||||
if (v20 > 0)
|
||||
{
|
||||
|
||||
actor->spr.flags |= 4;
|
||||
int vax = actFloorBounceVector(&actor->vel.X, &actor->vel.Y, (int*)&v20, actor->sector(), pThingInfo->elastic);
|
||||
int vax = actFloorBounceVector(&actor->__int_vel.X, &actor->__int_vel.Y, (int*)&v20, actor->sector(), pThingInfo->elastic);
|
||||
int nDamage = MulScale(vax, vax, 30) - pThingInfo->dmgResist;
|
||||
if (nDamage > 0) actDamageSprite(actor, actor, kDamageFall, nDamage);
|
||||
|
||||
actor->vel.Z = v20;
|
||||
if (actor->sector()->velFloor == 0 && abs(actor->vel.Z) < 0x10000)
|
||||
actor->__int_vel.Z = v20;
|
||||
if (actor->sector()->velFloor == 0 && abs(actor->__int_vel.Z) < 0x10000)
|
||||
{
|
||||
actor->vel.Z = 0;
|
||||
actor->__int_vel.Z = 0;
|
||||
actor->spr.flags &= ~4;
|
||||
}
|
||||
|
||||
switch (actor->spr.type)
|
||||
{
|
||||
case kThingNapalmBall:
|
||||
if (actor->vel.Z == 0 || Chance(0xA000)) actNapalmMove(actor);
|
||||
if (actor->__int_vel.Z == 0 || Chance(0xA000)) actNapalmMove(actor);
|
||||
break;
|
||||
|
||||
case kThingZombieHead:
|
||||
if (abs(actor->vel.Z) > 0x80000)
|
||||
if (abs(actor->__int_vel.Z) > 0x80000)
|
||||
{
|
||||
sfxPlay3DSound(actor, 607, 0, 0);
|
||||
actDamageSprite(nullptr, actor, kDamageFall, 80);
|
||||
|
@ -4638,14 +4638,14 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
break;
|
||||
|
||||
case kThingKickablePail:
|
||||
if (abs(actor->vel.Z) > 0x80000)
|
||||
if (abs(actor->__int_vel.Z) > 0x80000)
|
||||
sfxPlay3DSound(actor, 374, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
lhit.setSector(pSector);
|
||||
}
|
||||
else if (actor->vel.Z == 0)
|
||||
else if (actor->__int_vel.Z == 0)
|
||||
|
||||
actor->spr.flags &= ~4;
|
||||
}
|
||||
|
@ -4661,16 +4661,16 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
{
|
||||
actor->hit.ceilhit = ceilColl;
|
||||
actor->add_int_z(ClipLow(ceilZ - top, 0));
|
||||
if (actor->vel.Z < 0)
|
||||
if (actor->__int_vel.Z < 0)
|
||||
{
|
||||
actor->vel.X = MulScale(actor->vel.X, 0xc000, 16);
|
||||
actor->vel.Y = MulScale(actor->vel.Y, 0xc000, 16);
|
||||
actor->vel.Z = MulScale(-actor->vel.Z, 0x4000, 16);
|
||||
actor->__int_vel.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);
|
||||
|
||||
switch (actor->spr.type)
|
||||
{
|
||||
case kThingZombieHead:
|
||||
if (abs(actor->vel.Z) > 0x80000)
|
||||
if (abs(actor->__int_vel.Z) > 0x80000)
|
||||
{
|
||||
sfxPlay3DSound(actor, 607, 0, 0);
|
||||
actDamageSprite(nullptr, actor, kDamageFall, 80);
|
||||
|
@ -4678,7 +4678,7 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
break;
|
||||
|
||||
case kThingKickablePail:
|
||||
if (abs(actor->vel.Z) > 0x80000)
|
||||
if (abs(actor->__int_vel.Z) > 0x80000)
|
||||
sfxPlay3DSound(actor, 374, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
@ -4688,7 +4688,7 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
|
||||
if (bottom >= floorZ)
|
||||
{
|
||||
int nVel = approxDist(actor->vel.X, actor->vel.Y);
|
||||
int nVel = approxDist(actor->__int_vel.X, actor->__int_vel.Y);
|
||||
int nVelClipped = ClipHigh(nVel, 0x11111);
|
||||
Collision& coll = floorColl;
|
||||
|
||||
|
@ -4697,20 +4697,20 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
auto hitActor = coll.actor();
|
||||
if ((hitActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FACING)
|
||||
{
|
||||
actor->vel.X += MulScale(4, actor->int_pos().X - hitActor->int_pos().X, 2);
|
||||
actor->vel.Y += MulScale(4, actor->int_pos().Y - hitActor->int_pos().Y, 2);
|
||||
actor->__int_vel.X += MulScale(4, actor->int_pos().X - hitActor->int_pos().X, 2);
|
||||
actor->__int_vel.Y += MulScale(4, actor->int_pos().Y - hitActor->int_pos().Y, 2);
|
||||
lhit = actor->hit.hit;
|
||||
}
|
||||
}
|
||||
if (nVel > 0)
|
||||
{
|
||||
int t = DivScale(nVelClipped, nVel, 16);
|
||||
actor->vel.X -= MulScale(t, actor->vel.X, 16);
|
||||
actor->vel.Y -= MulScale(t, actor->vel.Y, 16);
|
||||
actor->__int_vel.X -= MulScale(t, actor->__int_vel.X, 16);
|
||||
actor->__int_vel.Y -= MulScale(t, actor->__int_vel.Y, 16);
|
||||
}
|
||||
}
|
||||
if (actor->vel.X || actor->vel.Y)
|
||||
actor->spr.angle = VecToAngle(actor->vel.X, actor->vel.Y);
|
||||
if (actor->__int_vel.X || actor->__int_vel.Y)
|
||||
actor->spr.angle = VecToAngle(actor->__int_vel.X, actor->__int_vel.Y);
|
||||
return lhit;
|
||||
}
|
||||
|
||||
|
@ -4741,11 +4741,11 @@ void MoveDude(DBloodActor* actor)
|
|||
|
||||
assert(pSector);
|
||||
|
||||
if (actor->vel.X || actor->vel.Y)
|
||||
if (actor->__int_vel.X || actor->__int_vel.Y)
|
||||
{
|
||||
if (pPlayer && gNoClip)
|
||||
{
|
||||
actor->add_int_pos({ actor->vel.X >> 12, actor->vel.Y >> 12, 0 });
|
||||
actor->add_int_pos({ actor->__int_vel.X >> 12, actor->__int_vel.Y >> 12, 0 });
|
||||
updatesector(actor->spr.pos, &pSector);
|
||||
if (!pSector) pSector = actor->sector();
|
||||
}
|
||||
|
@ -4753,7 +4753,7 @@ void MoveDude(DBloodActor* actor)
|
|||
{
|
||||
auto bakCstat = actor->spr.cstat;
|
||||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.X >> 12, actor->vel.Y >> 12, wd, tz, bz, CLIPMASK0, actor->hit.hit);
|
||||
ClipMove(actor->spr.pos, &pSector, actor->__int_vel.X >> 12, actor->__int_vel.Y >> 12, wd, tz, bz, CLIPMASK0, actor->hit.hit);
|
||||
if (pSector == nullptr)
|
||||
{
|
||||
pSector = actor->sector();
|
||||
|
@ -4822,7 +4822,7 @@ void MoveDude(DBloodActor* actor)
|
|||
// ???
|
||||
}
|
||||
}
|
||||
actWallBounceVector((int*)&actor->vel.X, (int*)&actor->vel.Y, pHitWall, 0);
|
||||
actWallBounceVector((int*)&actor->__int_vel.X, (int*)&actor->__int_vel.Y, pHitWall, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4868,7 +4868,7 @@ void MoveDude(DBloodActor* actor)
|
|||
if (pUpperLink && (pUpperLink->spr.type == kMarkerUpWater || pUpperLink->spr.type == kMarkerUpGoo)) bDepth = 1;
|
||||
if (pLowerLink && (pLowerLink->spr.type == kMarkerLowWater || pLowerLink->spr.type == kMarkerLowGoo)) bDepth = 1;
|
||||
if (pPlayer) wd += 16;
|
||||
if (actor->vel.Z) actor->add_int_z(actor->vel.Z >> 8);
|
||||
if (actor->__int_vel.Z) actor->add_int_z(actor->__int_vel.Z >> 8);
|
||||
|
||||
int ceilZ, floorZ;
|
||||
Collision ceilColl, floorColl;
|
||||
|
@ -4905,10 +4905,10 @@ void MoveDude(DBloodActor* actor)
|
|||
if (vc)
|
||||
{
|
||||
actor->add_int_z(((vc * 4) / 2) >> 8);
|
||||
actor->vel.Z += vc;
|
||||
actor->__int_vel.Z += vc;
|
||||
}
|
||||
}
|
||||
if (pPlayer && actor->vel.Z > 0x155555 && !pPlayer->fallScream && actor->xspr.height > 0)
|
||||
if (pPlayer && actor->__int_vel.Z > 0x155555 && !pPlayer->fallScream && actor->xspr.height > 0)
|
||||
{
|
||||
const bool playerAlive = (actor->xspr.health > 0) || VanillaMode(); // only trigger falling scream if player is alive or vanilla mode
|
||||
if (playerAlive)
|
||||
|
@ -4943,7 +4943,7 @@ void MoveDude(DBloodActor* actor)
|
|||
pPlayer->bubbleTime = 0;
|
||||
if (!pPlayer->cantJump && (pPlayer->input.actions & SB_JUMP))
|
||||
{
|
||||
actor->vel.Z = -0x6aaaa;
|
||||
actor->__int_vel.Z = -0x6aaaa;
|
||||
pPlayer->cantJump = 1;
|
||||
}
|
||||
sfxPlay3DSound(actor, 721, -1, 0);
|
||||
|
@ -4996,7 +4996,7 @@ void MoveDude(DBloodActor* actor)
|
|||
|
||||
pPlayer->posture = 1;
|
||||
actor->xspr.burnTime = 0;
|
||||
pPlayer->bubbleTime = abs(actor->vel.Z) >> 12;
|
||||
pPlayer->bubbleTime = abs(actor->__int_vel.Z) >> 12;
|
||||
evPostActor(actor, 0, kCallbackPlayerBubble);
|
||||
sfxPlay3DSound(actor, 720, -1, 0);
|
||||
}
|
||||
|
@ -5096,10 +5096,10 @@ void MoveDude(DBloodActor* actor)
|
|||
{
|
||||
actor->hit.florhit = floorColl;
|
||||
actor->add_int_z(floorZ - bottom);
|
||||
int v30 = actor->vel.Z - actor->sector()->velFloor;
|
||||
int v30 = actor->__int_vel.Z - actor->sector()->velFloor;
|
||||
if (v30 > 0)
|
||||
{
|
||||
int vax = actFloorBounceVector((int*)&actor->vel.X, (int*)&actor->vel.Y, (int*)&v30, actor->sector(), 0);
|
||||
int vax = actFloorBounceVector((int*)&actor->__int_vel.X, (int*)&actor->__int_vel.Y, (int*)&v30, actor->sector(), 0);
|
||||
int nDamage = MulScale(vax, vax, 30);
|
||||
if (pPlayer)
|
||||
{
|
||||
|
@ -5113,10 +5113,10 @@ void MoveDude(DBloodActor* actor)
|
|||
nDamage -= 100 << 4;
|
||||
if (nDamage > 0)
|
||||
actDamageSprite(actor, actor, kDamageFall, nDamage);
|
||||
actor->vel.Z = v30;
|
||||
if (abs(actor->vel.Z) < 0x10000)
|
||||
actor->__int_vel.Z = v30;
|
||||
if (abs(actor->__int_vel.Z) < 0x10000)
|
||||
{
|
||||
actor->vel.Z = actor->sector()->velFloor;
|
||||
actor->__int_vel.Z = actor->sector()->velFloor;
|
||||
actor->spr.flags &= ~4;
|
||||
}
|
||||
else
|
||||
|
@ -5138,9 +5138,9 @@ void MoveDude(DBloodActor* actor)
|
|||
auto pFX2 = gFX.fxSpawnActor(FX_14, pFX->sector(), pFX->spr.pos, 0);
|
||||
if (pFX2)
|
||||
{
|
||||
pFX2->vel.X = Random2(0x6aaaa);
|
||||
pFX2->vel.Y = Random2(0x6aaaa);
|
||||
pFX2->vel.Z = -(int)Random(0xd5555);
|
||||
pFX2->__int_vel.X = Random2(0x6aaaa);
|
||||
pFX2->__int_vel.Y = Random2(0x6aaaa);
|
||||
pFX2->__int_vel.Z = -(int)Random(0xd5555);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5148,7 +5148,7 @@ void MoveDude(DBloodActor* actor)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (actor->vel.Z == 0)
|
||||
else if (actor->__int_vel.Z == 0)
|
||||
|
||||
actor->spr.flags &= ~4;
|
||||
}
|
||||
|
@ -5164,8 +5164,8 @@ void MoveDude(DBloodActor* actor)
|
|||
actor->hit.ceilhit = ceilColl;
|
||||
actor->add_int_z(ClipLow(ceilZ - top, 0));
|
||||
|
||||
if (actor->vel.Z <= 0 && (actor->spr.flags & 4))
|
||||
actor->vel.Z = MulScale(-actor->vel.Z, 0x2000, 16);
|
||||
if (actor->__int_vel.Z <= 0 && (actor->spr.flags & 4))
|
||||
actor->__int_vel.Z = MulScale(-actor->__int_vel.Z, 0x2000, 16);
|
||||
}
|
||||
else
|
||||
actor->hit.ceilhit.setNone();
|
||||
|
@ -5173,15 +5173,15 @@ void MoveDude(DBloodActor* actor)
|
|||
GetActorExtents(actor, &top, &bottom);
|
||||
|
||||
actor->xspr.height = ClipLow(floorZ - bottom, 0) >> 8;
|
||||
if (actor->vel.X || actor->vel.Y)
|
||||
if (actor->__int_vel.X || actor->__int_vel.Y)
|
||||
{
|
||||
if (floorColl.type == kHitSprite)
|
||||
{
|
||||
auto hitAct = floorColl.actor();
|
||||
if ((hitAct->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FACING)
|
||||
{
|
||||
actor->vel.X += MulScale(4, actor->int_pos().X - hitAct->int_pos().X, 2);
|
||||
actor->vel.Y += MulScale(4, actor->int_pos().Y - hitAct->int_pos().Y, 2);
|
||||
actor->__int_vel.X += MulScale(4, actor->int_pos().X - hitAct->int_pos().X, 2);
|
||||
actor->__int_vel.Y += MulScale(4, actor->int_pos().Y - hitAct->int_pos().Y, 2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -5192,11 +5192,11 @@ void MoveDude(DBloodActor* actor)
|
|||
int nDrag = gDudeDrag;
|
||||
if (actor->xspr.height > 0)
|
||||
nDrag -= Scale(gDudeDrag, actor->xspr.height, 0x100);
|
||||
actor->vel.X -= mulscale16r(actor->vel.X, nDrag);
|
||||
actor->vel.Y -= mulscale16r(actor->vel.Y, nDrag);
|
||||
actor->__int_vel.X -= mulscale16r(actor->__int_vel.X, nDrag);
|
||||
actor->__int_vel.Y -= mulscale16r(actor->__int_vel.Y, nDrag);
|
||||
|
||||
if (approxDist(actor->vel.X, actor->vel.Y) < 0x1000)
|
||||
actor->vel.X = actor->vel.Y = 0;
|
||||
if (approxDist(actor->__int_vel.X, actor->__int_vel.Y) < 0x1000)
|
||||
actor->__int_vel.X = actor->__int_vel.Y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5222,7 +5222,7 @@ int MoveMissile(DBloodActor* actor)
|
|||
gHitInfo.clearObj();
|
||||
if (actor->spr.type == kMissileFlameSpray) actAirDrag(actor, 0x1000);
|
||||
|
||||
if (actor->GetTarget() != nullptr && (actor->vel.X || actor->vel.Y || actor->vel.Z))
|
||||
if (actor->GetTarget() != nullptr && (actor->__int_vel.X || actor->__int_vel.Y || actor->__int_vel.Z))
|
||||
{
|
||||
auto target = actor->GetTarget();
|
||||
|
||||
|
@ -5232,13 +5232,13 @@ int MoveMissile(DBloodActor* actor)
|
|||
int vx = missileInfo[actor->spr.type - kMissileBase].velocity;
|
||||
int vy = 0;
|
||||
RotatePoint(&vx, &vy, (nTargetAngle + 1536) & 2047, 0, 0);
|
||||
actor->vel.X = vx;
|
||||
actor->vel.Y = vy;
|
||||
actor->__int_vel.X = vx;
|
||||
actor->__int_vel.Y = vy;
|
||||
int dz = target->int_pos().Z - actor->int_pos().Z;
|
||||
|
||||
int deltaz = dz / 10;
|
||||
if (target->int_pos().Z < actor->int_pos().Z) deltaz = -deltaz;
|
||||
actor->vel.Z += deltaz;
|
||||
actor->__int_vel.Z += deltaz;
|
||||
}
|
||||
}
|
||||
auto vel = actor->fVel();
|
||||
|
@ -5671,14 +5671,14 @@ static void actCheckThings()
|
|||
}
|
||||
if (pSector->floorstat & CSTAT_SECTOR_ALIGN) angle = (angle + GetWallAngle(pSector->firstWall()) + 512) & 2047;
|
||||
|
||||
actor->vel.X += MulScale(speed, Cos(angle), 30);
|
||||
actor->vel.Y += MulScale(speed, Sin(angle), 30);
|
||||
actor->__int_vel.X += MulScale(speed, Cos(angle), 30);
|
||||
actor->__int_vel.Y += MulScale(speed, Sin(angle), 30);
|
||||
}
|
||||
}
|
||||
actAirDrag(actor, 128);
|
||||
|
||||
if (((actor->GetIndex() >> 8) & 15) == (gFrameCount & 15) && (actor->spr.flags & 2)) actor->spr.flags |= 4;
|
||||
if ((actor->spr.flags & 4) || actor->vel.X || actor->vel.Y || actor->vel.Z || actor->sector()->velFloor || actor->sector()->velCeil)
|
||||
if ((actor->spr.flags & 4) || actor->__int_vel.X || actor->__int_vel.Y || actor->__int_vel.Z || actor->sector()->velFloor || actor->sector()->velCeil)
|
||||
{
|
||||
Collision hit = MoveThing(actor);
|
||||
if (hit.type)
|
||||
|
@ -5945,9 +5945,9 @@ static void actCheckTraps()
|
|||
auto pFX = gFX.fxSpawnActor(FX_32, actor->sector(), x, y, z, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel.X = dx + Random2(0x8888);
|
||||
pFX->vel.Y = dy + Random2(0x8888);
|
||||
pFX->vel.Z = Random2(0x8888);
|
||||
pFX->__int_vel.X = dx + Random2(0x8888);
|
||||
pFX->__int_vel.Y = dy + Random2(0x8888);
|
||||
pFX->__int_vel.Z = Random2(0x8888);
|
||||
}
|
||||
x += (dx / 2) >> 12;
|
||||
y += (dy / 2) >> 12;
|
||||
|
@ -6001,7 +6001,7 @@ static void actCheckDudes()
|
|||
// handle incarnations of custom dude
|
||||
if (actor->spr.type == kDudeModernCustom && actor->xspr.txID > 0 && actor->xspr.sysData1 == kGenDudeTransformStatus)
|
||||
{
|
||||
actor->vel.X = actor->vel.Y = 0;
|
||||
actor->__int_vel.X = actor->__int_vel.Y = 0;
|
||||
if (seqGetStatus(actor) < 0) genDudeTransform(actor);
|
||||
}
|
||||
#endif
|
||||
|
@ -6054,7 +6054,7 @@ static void actCheckDudes()
|
|||
else
|
||||
pPlayer->chokeEffect = 0;
|
||||
|
||||
if (actor->vel.X || actor->vel.Y)
|
||||
if (actor->__int_vel.X || actor->__int_vel.Y)
|
||||
sfxPlay3DSound(actor, 709, 100, 2);
|
||||
|
||||
pPlayer->bubbleTime = ClipLow(pPlayer->bubbleTime - 4, 0);
|
||||
|
@ -6099,14 +6099,14 @@ static void actCheckDudes()
|
|||
angle = (angle + GetWallAngle(pSector->firstWall()) + 512) & 2047;
|
||||
int dx = MulScale(speed, Cos(angle), 30);
|
||||
int dy = MulScale(speed, Sin(angle), 30);
|
||||
actor->vel.X += dx;
|
||||
actor->vel.Y += dy;
|
||||
actor->__int_vel.X += dx;
|
||||
actor->__int_vel.Y += dy;
|
||||
}
|
||||
}
|
||||
if (pXSector && pXSector->Underwater) actAirDrag(actor, 5376);
|
||||
else actAirDrag(actor, 128);
|
||||
|
||||
if ((actor->spr.flags & 4) || actor->vel.X || actor->vel.Y || actor->vel.Z || actor->sector()->velFloor || actor->sector()->velCeil)
|
||||
if ((actor->spr.flags & 4) || actor->__int_vel.X || actor->__int_vel.Y || actor->__int_vel.Z || actor->sector()->velFloor || actor->sector()->velCeil)
|
||||
MoveDude(actor);
|
||||
}
|
||||
}
|
||||
|
@ -6140,7 +6140,7 @@ void actCheckFlares()
|
|||
pos.Y += mulscale30r(Sin(actor->xspr.goalAng + target->int_ang()), target->spr.clipdist * 2) * inttoworld;
|
||||
pos.Z += actor->xspr.TargetPos.Z;
|
||||
SetActor(actor, pos);
|
||||
actor->vel = target->vel;
|
||||
actor->__int_vel = target->__int_vel;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6206,7 +6206,7 @@ DBloodActor* actSpawnSprite(DBloodActor* source, int nStat)
|
|||
DBloodActor* actor = InsertSprite(source->sector(), nStat);
|
||||
|
||||
actor->spr.pos = source->spr.pos;
|
||||
actor->vel = source->vel;
|
||||
actor->__int_vel = source->__int_vel;
|
||||
actor->spr.flags = 0;
|
||||
actor->addX();
|
||||
actor->hit.florhit.setNone();
|
||||
|
@ -6400,12 +6400,12 @@ 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->vel.X = MulScale(a6, Cos(fired->int_ang()), 30);
|
||||
fired->vel.Y = MulScale(a6, Sin(fired->int_ang()), 30);
|
||||
fired->vel.Z = MulScale(a6, a4, 14);
|
||||
fired->vel.X += actor->vel.X / 2;
|
||||
fired->vel.Y += actor->vel.Y / 2;
|
||||
fired->vel.Z += actor->vel.Z / 2;
|
||||
fired->__int_vel.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->__int_vel.X += actor->__int_vel.X / 2;
|
||||
fired->__int_vel.Y += actor->__int_vel.Y / 2;
|
||||
fired->__int_vel.Z += actor->__int_vel.Z / 2;
|
||||
return fired;
|
||||
}
|
||||
|
||||
|
@ -6448,9 +6448,9 @@ void actBuildMissile(DBloodActor* spawned, DBloodActor* actor)
|
|||
break;
|
||||
case kMissileFlameHound:
|
||||
seqSpawn(27, spawned, -1);
|
||||
spawned->vel.X += actor->vel.X / 2 + Random2(0x11111);
|
||||
spawned->vel.Y += actor->vel.Y / 2 + Random2(0x11111);
|
||||
spawned->vel.Z += actor->vel.Z / 2 + Random2(0x11111);
|
||||
spawned->__int_vel.X += actor->__int_vel.X / 2 + Random2(0x11111);
|
||||
spawned->__int_vel.Y += actor->__int_vel.Y / 2 + Random2(0x11111);
|
||||
spawned->__int_vel.Z += actor->__int_vel.Z / 2 + Random2(0x11111);
|
||||
break;
|
||||
case kMissileFireballCerberus:
|
||||
seqSpawn(61, spawned, dword_2192E0);
|
||||
|
@ -6458,16 +6458,16 @@ void actBuildMissile(DBloodActor* spawned, DBloodActor* actor)
|
|||
break;
|
||||
case kMissileFireballTchernobog:
|
||||
seqSpawn(23, spawned, dword_2192D8);
|
||||
spawned->vel.X += actor->vel.X / 2 + Random2(0x11111);
|
||||
spawned->vel.Y += actor->vel.Y / 2 + Random2(0x11111);
|
||||
spawned->vel.Z += actor->vel.Z / 2 + Random2(0x11111);
|
||||
spawned->__int_vel.X += actor->__int_vel.X / 2 + Random2(0x11111);
|
||||
spawned->__int_vel.Y += actor->__int_vel.Y / 2 + Random2(0x11111);
|
||||
spawned->__int_vel.Z += actor->__int_vel.Z / 2 + Random2(0x11111);
|
||||
break;
|
||||
case kMissileFlameSpray:
|
||||
if (Chance(0x8000)) seqSpawn(0, spawned, -1);
|
||||
else seqSpawn(1, spawned, -1);
|
||||
spawned->vel.X += actor->vel.X / 2 + Random2(0x11111);
|
||||
spawned->vel.Y += actor->vel.Y / 2 + Random2(0x11111);
|
||||
spawned->vel.Z += actor->vel.Z / 2 + Random2(0x11111);
|
||||
spawned->__int_vel.X += actor->__int_vel.X / 2 + Random2(0x11111);
|
||||
spawned->__int_vel.Y += actor->__int_vel.Y / 2 + Random2(0x11111);
|
||||
spawned->__int_vel.Z += actor->__int_vel.Z / 2 + Random2(0x11111);
|
||||
break;
|
||||
case kMissileFlareAlt:
|
||||
evPostActor(spawned, 30, kCallbackFXFlareBurst);
|
||||
|
@ -6533,9 +6533,9 @@ 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->vel.X = MulScale(pMissileInfo->velocity, a4, 14);
|
||||
spawned->vel.Y = MulScale(pMissileInfo->velocity, a5, 14);
|
||||
spawned->vel.Z = MulScale(pMissileInfo->velocity, a6, 14);
|
||||
spawned->__int_vel.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);
|
||||
spawned->spr.cstat |= CSTAT_SPRITE_BLOCK;
|
||||
spawned->SetTarget(nullptr);
|
||||
|
@ -6769,9 +6769,9 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
if (t > 0 && pVectorData->impulse)
|
||||
{
|
||||
int t2 = DivScale(pVectorData->impulse, t, 8);
|
||||
actor->vel.X += MulScale(a4, t2, 16);
|
||||
actor->vel.Y += MulScale(a5, t2, 16);
|
||||
actor->vel.Z += MulScale(a6, t2, 16);
|
||||
actor->__int_vel.X += MulScale(a4, t2, 16);
|
||||
actor->__int_vel.Y += MulScale(a5, t2, 16);
|
||||
actor->__int_vel.Z += MulScale(a6, t2, 16);
|
||||
}
|
||||
if (pVectorData->burnTime)
|
||||
{
|
||||
|
@ -6799,9 +6799,9 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
if (t > 0 && pVectorData->impulse)
|
||||
{
|
||||
int t2 = DivScale(pVectorData->impulse, t, 8);
|
||||
actor->vel.X += MulScale(a4, t2, 16);
|
||||
actor->vel.Y += MulScale(a5, t2, 16);
|
||||
actor->vel.Z += MulScale(a6, t2, 16);
|
||||
actor->__int_vel.X += MulScale(a4, t2, 16);
|
||||
actor->__int_vel.Y += MulScale(a5, t2, 16);
|
||||
actor->__int_vel.Z += MulScale(a6, t2, 16);
|
||||
}
|
||||
if (pVectorData->burnTime)
|
||||
{
|
||||
|
@ -6835,7 +6835,7 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
else if (t3 > FX_NONE) pFX = gFX.fxSpawnActor(t3, pSector1, xx, yy, zz, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel.Z = 0x2222;
|
||||
pFX->__int_vel.Z = 0x2222;
|
||||
pFX->set_int_ang((GetWallAngle(pWall) + 512) & 2047);
|
||||
pFX->spr.cstat |= CSTAT_SPRITE_ALIGNMENT_WALL;
|
||||
}
|
||||
|
@ -6857,9 +6857,9 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
if (actor->xspr.physAttr & kPhysDebrisVector) {
|
||||
|
||||
int impulse = DivScale(pVectorData->impulse, ClipLow(actor->spriteMass.mass, 10), 6);
|
||||
actor->vel.X += MulScale(a4, impulse, 16);
|
||||
actor->vel.Y += MulScale(a5, impulse, 16);
|
||||
actor->vel.Z += MulScale(a6, impulse, 16);
|
||||
actor->__int_vel.X += MulScale(a4, impulse, 16);
|
||||
actor->__int_vel.Y += MulScale(a5, impulse, 16);
|
||||
actor->__int_vel.Z += MulScale(a6, impulse, 16);
|
||||
|
||||
if (pVectorData->burnTime != 0) {
|
||||
if (!actor->xspr.burnTime) evPostActor(actor, 0, kCallbackFXFlameLick);
|
||||
|
@ -6926,7 +6926,7 @@ void FireballSeqCallback(int, DBloodActor* actor)
|
|||
auto pFX = gFX.fxSpawnActor(FX_11, actor->sector(), actor->spr.pos, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel = actor->vel;
|
||||
pFX->__int_vel = actor->__int_vel;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6935,7 +6935,7 @@ void NapalmSeqCallback(int, DBloodActor* actor)
|
|||
auto pFX = gFX.fxSpawnActor(FX_12, actor->sector(), actor->spr.pos, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel = actor->vel;
|
||||
pFX->__int_vel = actor->__int_vel;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6944,7 +6944,7 @@ void Fx32Callback(int, DBloodActor* actor)
|
|||
auto pFX = gFX.fxSpawnActor(FX_32, actor->sector(), actor->spr.pos, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel = actor->vel;
|
||||
pFX->__int_vel = actor->__int_vel;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6953,7 +6953,7 @@ void Fx33Callback(int, DBloodActor* actor)
|
|||
auto pFX = gFX.fxSpawnActor(FX_33, actor->sector(), actor->spr.pos, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel = actor->vel;
|
||||
pFX->__int_vel = actor->__int_vel;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -253,8 +253,8 @@ void aiChooseDirection(DBloodActor* actor, int a3)
|
|||
int vc = getincangle(actor->int_ang(), a3);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int vsi = ((t1 * 15) >> 12) / 2;
|
||||
int v8 = 341;
|
||||
|
@ -303,8 +303,8 @@ void aiMoveForward(DBloodActor* actor)
|
|||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||
if (abs(nAng) > DAngle60)
|
||||
return;
|
||||
actor->vel.X += MulScale(pDudeInfo->frontSpeed, Cos(actor->int_ang()), 30);
|
||||
actor->vel.Y += MulScale(pDudeInfo->frontSpeed, Sin(actor->int_ang()), 30);
|
||||
actor->__int_vel.X += MulScale(pDudeInfo->frontSpeed, Cos(actor->int_ang()), 30);
|
||||
actor->__int_vel.Y += MulScale(pDudeInfo->frontSpeed, Sin(actor->int_ang()), 30);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -339,8 +339,8 @@ void aiMoveDodge(DBloodActor* actor)
|
|||
{
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -348,8 +348,8 @@ void aiMoveDodge(DBloodActor* actor)
|
|||
else
|
||||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -205,8 +205,8 @@ static void batMoveDodgeUp(DBloodActor* actor)
|
|||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -214,9 +214,9 @@ static void batMoveDodgeUp(DBloodActor* actor)
|
|||
else
|
||||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = -0x52aaa;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = -0x52aaa;
|
||||
}
|
||||
|
||||
static void batMoveDodgeDown(DBloodActor* actor)
|
||||
|
@ -230,8 +230,8 @@ static void batMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -239,9 +239,9 @@ static void batMoveDodgeDown(DBloodActor* actor)
|
|||
else
|
||||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = 0x44444;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
static void batThinkChase(DBloodActor* actor)
|
||||
|
@ -321,16 +321,16 @@ static void batMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
t1 += nAccel;
|
||||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
}
|
||||
|
||||
static void batMoveSwoop(DBloodActor* actor)
|
||||
|
@ -352,14 +352,14 @@ static void batMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = 0x44444;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
static void batMoveFly(DBloodActor* actor)
|
||||
|
@ -381,14 +381,14 @@ static void batMoveFly(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = -0x2d555;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = -0x2d555;
|
||||
}
|
||||
|
||||
void batMoveToCeil(DBloodActor* actor)
|
||||
|
|
|
@ -402,8 +402,8 @@ static void beastMoveForward(DBloodActor* actor)
|
|||
int nDist = approxDist(dvec);
|
||||
if (nDist <= 0x400 && Random(64) < 32)
|
||||
return;
|
||||
actor->vel.X += MulScale(pDudeInfo->frontSpeed, Cos(actor->int_ang()), 30);
|
||||
actor->vel.Y += MulScale(pDudeInfo->frontSpeed, Sin(actor->int_ang()), 30);
|
||||
actor->__int_vel.X += MulScale(pDudeInfo->frontSpeed, Cos(actor->int_ang()), 30);
|
||||
actor->__int_vel.Y += MulScale(pDudeInfo->frontSpeed, Sin(actor->int_ang()), 30);
|
||||
}
|
||||
|
||||
static void sub_628A0(DBloodActor* actor)
|
||||
|
@ -424,16 +424,16 @@ static void sub_628A0(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
t1 += nAccel;
|
||||
else
|
||||
t1 += nAccel >> 2;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
}
|
||||
|
||||
static void sub_62AE0(DBloodActor* actor)
|
||||
|
@ -460,14 +460,14 @@ static void sub_62AE0(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = -dz;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = -dz;
|
||||
}
|
||||
|
||||
static void sub_62D7C(DBloodActor* actor)
|
||||
|
@ -494,14 +494,14 @@ static void sub_62D7C(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = dz;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = dz;
|
||||
}
|
||||
|
||||
END_BLD_NS
|
||||
|
|
|
@ -220,8 +220,8 @@ static void eelMoveDodgeUp(DBloodActor* actor)
|
|||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -229,9 +229,9 @@ static void eelMoveDodgeUp(DBloodActor* actor)
|
|||
else
|
||||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = -0x8000;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = -0x8000;
|
||||
}
|
||||
|
||||
static void eelMoveDodgeDown(DBloodActor* actor)
|
||||
|
@ -245,8 +245,8 @@ static void eelMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -254,9 +254,9 @@ static void eelMoveDodgeDown(DBloodActor* actor)
|
|||
else
|
||||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = 0x44444;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
static void eelThinkChase(DBloodActor* actor)
|
||||
|
@ -333,16 +333,16 @@ static void eelMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
t1 += nAccel;
|
||||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
}
|
||||
|
||||
static void eelMoveSwoop(DBloodActor* actor)
|
||||
|
@ -361,14 +361,14 @@ static void eelMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = 0x22222;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = 0x22222;
|
||||
}
|
||||
|
||||
static void eelMoveAscend(DBloodActor* actor)
|
||||
|
@ -387,14 +387,14 @@ static void eelMoveAscend(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = -0x8000;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = -0x8000;
|
||||
}
|
||||
|
||||
void eelMoveToCeil(DBloodActor* actor)
|
||||
|
|
|
@ -292,16 +292,16 @@ static void sub_65D04(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
t1 += nAccel;
|
||||
else
|
||||
t1 += nAccel >> 2;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
}
|
||||
|
||||
static void sub_65F44(DBloodActor* actor)
|
||||
|
@ -329,14 +329,14 @@ static void sub_65F44(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = -dz;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = -dz;
|
||||
}
|
||||
|
||||
static void sub_661E0(DBloodActor* actor)
|
||||
|
@ -364,14 +364,14 @@ static void sub_661E0(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = dz;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = dz;
|
||||
}
|
||||
|
||||
END_BLD_NS
|
||||
|
|
|
@ -100,9 +100,9 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor)
|
|||
if (tt1.at10)
|
||||
{
|
||||
int t = DivScale(nDist, tt1.at10, 12);
|
||||
x2 += (actor2->vel.X * t) >> 12;
|
||||
y2 += (actor2->vel.Y * t) >> 12;
|
||||
z2 += (actor2->vel.Z * t) >> 8;
|
||||
x2 += (actor2->__int_vel.X * t) >> 12;
|
||||
y2 += (actor2->__int_vel.Y * t) >> 12;
|
||||
z2 += (actor2->__int_vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
|
@ -177,9 +177,9 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
|
|||
if (tt1.at10)
|
||||
{
|
||||
int t = DivScale(nDist, tt1.at10, 12);
|
||||
x2 += (actor->vel.X * t) >> 12;
|
||||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
x2 += (actor->__int_vel.X * t) >> 12;
|
||||
y2 += (actor->__int_vel.Y * t) >> 12;
|
||||
z2 += (actor->__int_vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
|
|
|
@ -129,9 +129,9 @@ void BlastSSeqCallback(int, DBloodActor* actor)
|
|||
if (tt.at10)
|
||||
{
|
||||
int t = DivScale(nDist, tt.at10, 12);
|
||||
x2 += (actor->vel.X * t) >> 12;
|
||||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
x2 += (actor->__int_vel.X * t) >> 12;
|
||||
y2 += (actor->__int_vel.Y * t) >> 12;
|
||||
z2 += (actor->__int_vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
|
@ -281,8 +281,8 @@ static void gargMoveDodgeUp(DBloodActor* actor)
|
|||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -290,9 +290,9 @@ static void gargMoveDodgeUp(DBloodActor* actor)
|
|||
else
|
||||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = -0x1d555;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = -0x1d555;
|
||||
}
|
||||
|
||||
static void gargMoveDodgeDown(DBloodActor* actor)
|
||||
|
@ -309,8 +309,8 @@ static void gargMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -318,9 +318,9 @@ static void gargMoveDodgeDown(DBloodActor* actor)
|
|||
else
|
||||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = 0x44444;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
static void gargThinkChase(DBloodActor* actor)
|
||||
|
@ -534,16 +534,16 @@ static void gargMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
t1 += nAccel;
|
||||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
}
|
||||
|
||||
static void gargMoveSlow(DBloodActor* actor)
|
||||
|
@ -568,20 +568,20 @@ static void gargMoveSlow(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 = nAccel >> 1;
|
||||
t2 >>= 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
switch (actor->spr.type) {
|
||||
case kDudeGargoyleFlesh:
|
||||
actor->vel.Z = 0x44444;
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
break;
|
||||
case kDudeGargoyleStone:
|
||||
actor->vel.Z = 0x35555;
|
||||
actor->__int_vel.Z = 0x35555;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -608,19 +608,19 @@ static void gargMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
switch (actor->spr.type) {
|
||||
case kDudeGargoyleFlesh:
|
||||
actor->vel.Z = t1;
|
||||
actor->__int_vel.Z = t1;
|
||||
break;
|
||||
case kDudeGargoyleStone:
|
||||
actor->vel.Z = t1;
|
||||
actor->__int_vel.Z = t1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -647,19 +647,19 @@ static void gargMoveFly(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
switch (actor->spr.type) {
|
||||
case kDudeGargoyleFlesh:
|
||||
actor->vel.Z = -t1;
|
||||
actor->__int_vel.Z = -t1;
|
||||
break;
|
||||
case kDudeGargoyleStone:
|
||||
actor->vel.Z = -t1;
|
||||
actor->__int_vel.Z = -t1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,9 +115,9 @@ void ghostBlastSeqCallback(int, DBloodActor* actor)
|
|||
if (tt.at10)
|
||||
{
|
||||
int t = DivScale(nDist, tt.at10, 12);
|
||||
x2 += (actor->vel.X * t) >> 12;
|
||||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
x2 += (actor->__int_vel.X * t) >> 12;
|
||||
y2 += (actor->__int_vel.Y * t) >> 12;
|
||||
z2 += (actor->__int_vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
|
@ -260,8 +260,8 @@ static void ghostMoveDodgeUp(DBloodActor* actor)
|
|||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -269,9 +269,9 @@ static void ghostMoveDodgeUp(DBloodActor* actor)
|
|||
else
|
||||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = -0x1d555;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = -0x1d555;
|
||||
}
|
||||
|
||||
static void ghostMoveDodgeDown(DBloodActor* actor)
|
||||
|
@ -288,8 +288,8 @@ static void ghostMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
int dy = actor->vel.Y;
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -297,9 +297,9 @@ static void ghostMoveDodgeDown(DBloodActor* actor)
|
|||
else
|
||||
t2 -= pDudeInfo->sideSpeed;
|
||||
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = 0x44444;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
}
|
||||
|
||||
static void ghostThinkChase(DBloodActor* actor)
|
||||
|
@ -430,16 +430,16 @@ static void ghostMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
t1 += nAccel;
|
||||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
}
|
||||
|
||||
static void ghostMoveSlow(DBloodActor* actor)
|
||||
|
@ -464,17 +464,17 @@ static void ghostMoveSlow(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 = nAccel >> 1;
|
||||
t2 >>= 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
switch (actor->spr.type) {
|
||||
case kDudePhantasm:
|
||||
actor->vel.Z = 0x44444;
|
||||
actor->__int_vel.Z = 0x44444;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -501,16 +501,16 @@ static void ghostMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
switch (actor->spr.type) {
|
||||
case kDudePhantasm:
|
||||
actor->vel.Z = t1;
|
||||
actor->__int_vel.Z = t1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -537,16 +537,16 @@ static void ghostMoveFly(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
switch (actor->spr.type) {
|
||||
case kDudePhantasm:
|
||||
actor->vel.Z = -t1;
|
||||
actor->__int_vel.Z = -t1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -279,16 +279,16 @@ static void sub_6CB00(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
t1 += nAccel;
|
||||
else
|
||||
t1 += nAccel >> 2;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
}
|
||||
|
||||
static void sub_6CD74(DBloodActor* actor)
|
||||
|
@ -315,14 +315,14 @@ static void sub_6CD74(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = -dz;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = -dz;
|
||||
}
|
||||
|
||||
static void sub_6D03C(DBloodActor* actor)
|
||||
|
@ -349,14 +349,14 @@ static void sub_6D03C(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->vel.Z = dz;
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.Z = dz;
|
||||
}
|
||||
|
||||
END_BLD_NS
|
||||
|
|
|
@ -121,9 +121,9 @@ void SpidJumpSeqCallback(int, DBloodActor* actor)
|
|||
case kDudeSpiderBrown:
|
||||
case kDudeSpiderRed:
|
||||
case kDudeSpiderBlack:
|
||||
actor->vel.X = IntToFixed(dx);
|
||||
actor->vel.Y = IntToFixed(dy);
|
||||
actor->vel.Z = IntToFixed(dz);
|
||||
actor->__int_vel.X = IntToFixed(dx);
|
||||
actor->__int_vel.Y = IntToFixed(dy);
|
||||
actor->__int_vel.Z = IntToFixed(dz);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,9 +84,9 @@ void sub_71BD4(int, DBloodActor* actor)
|
|||
if (tt.at10)
|
||||
{
|
||||
int t = DivScale(nDist, tt.at10, 12);
|
||||
x2 += (actor->vel.X * t) >> 12;
|
||||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
x2 += (actor->__int_vel.X * t) >> 12;
|
||||
y2 += (actor->__int_vel.Y * t) >> 12;
|
||||
z2 += (actor->__int_vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
|
@ -156,9 +156,9 @@ void sub_720AC(int, DBloodActor* actor)
|
|||
if (tt.at10)
|
||||
{
|
||||
int t = DivScale(nDist, tt.at10, 12);
|
||||
x2 += (actor->vel.X * t) >> 12;
|
||||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
x2 += (actor->__int_vel.X * t) >> 12;
|
||||
y2 += (actor->__int_vel.Y * t) >> 12;
|
||||
z2 += (actor->__int_vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
|
|
|
@ -220,7 +220,7 @@ void genDudeAttack1(int, DBloodActor* actor)
|
|||
if (actor->GetTarget() == nullptr) return;
|
||||
|
||||
int dx, dy, dz;
|
||||
actor->vel.X = actor->vel.Y = 0;
|
||||
actor->__int_vel.X = actor->__int_vel.Y = 0;
|
||||
|
||||
GENDUDEEXTRA* pExtra = &actor->genDudeExtra;
|
||||
int dispersion = pExtra->baseDispersion;
|
||||
|
@ -487,8 +487,8 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
// quick hack to prevent spinning around or changing attacker's sprite angle on high movement speeds
|
||||
// when attacking the target. It happens because vanilla function takes in account x and y velocity,
|
||||
// so i use fake velocity with fixed value and pass it as argument.
|
||||
int xvelocity = actor->vel.X;
|
||||
int yvelocity = actor->vel.Y;
|
||||
int xvelocity = actor->__int_vel.X;
|
||||
int yvelocity = actor->__int_vel.Y;
|
||||
if (inAttack(actor->xspr.aiState))
|
||||
xvelocity = yvelocity = ClipLow(actor->spr.clipdist >> 1, 1);
|
||||
|
||||
|
@ -1128,16 +1128,16 @@ void aiGenDudeMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->vel.X;
|
||||
int vy = actor->vel.Y;
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
t1 += nAccel;
|
||||
else
|
||||
t1 += nAccel >> 1;
|
||||
actor->vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
actor->__int_vel.X = DMulScale(t1, nCos, t2, nSin, 30);
|
||||
actor->__int_vel.Y = DMulScale(t1, nSin, -t2, nCos, 30);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1152,8 +1152,8 @@ void aiGenDudeMoveForward(DBloodActor* actor)
|
|||
int cos = Cos(actor->int_ang());
|
||||
|
||||
int frontSpeed = actor->genDudeExtra.moveSpeed;
|
||||
actor->vel.X += MulScale(cos, frontSpeed, 30);
|
||||
actor->vel.Y += MulScale(sin, frontSpeed, 30);
|
||||
actor->__int_vel.X += MulScale(cos, frontSpeed, 30);
|
||||
actor->__int_vel.Y += MulScale(sin, frontSpeed, 30);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1798,8 +1798,8 @@ void dudeLeechOperate(DBloodActor* actor, const EVENT& event)
|
|||
if (nDist != 0 && cansee(actor->int_pos().X, actor->int_pos().Y, top, actor->sector(), x, y, z, actTarget->sector()))
|
||||
{
|
||||
int t = DivScale(nDist, 0x1aaaaa, 12);
|
||||
x += (actTarget->vel.X * t) >> 12;
|
||||
y += (actTarget->vel.Y * t) >> 12;
|
||||
x += (actTarget->__int_vel.X * t) >> 12;
|
||||
y += (actTarget->__int_vel.Y * t) >> 12;
|
||||
auto angBak = actor->spr.angle;
|
||||
actor->spr.angle = VecToAngle(atpos - actor->spr.pos.XY());
|
||||
int dx = bcos(actor->int_ang());
|
||||
|
|
|
@ -120,7 +120,7 @@ public:
|
|||
|
||||
void ZeroVelocity()
|
||||
{
|
||||
vel = { 0,0,0 };
|
||||
__int_vel = { 0,0,0 };
|
||||
}
|
||||
|
||||
bool isActive()
|
||||
|
|
|
@ -53,9 +53,9 @@ void fxFlameLick(DBloodActor* actor, sectortype*) // 0
|
|||
auto pFX = gFX.fxSpawnActor(FX_32, actor->sector(), x, y, z, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel.X = actor->vel.X + Random2(-dx);
|
||||
pFX->vel.Y = actor->vel.Y + Random2(-dy);
|
||||
pFX->vel.Z = actor->vel.Z - Random(0x1aaaa);
|
||||
pFX->__int_vel.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);
|
||||
}
|
||||
}
|
||||
if (actor->xspr.burnTime > 0)
|
||||
|
@ -87,7 +87,7 @@ void Remove(DBloodActor* actor, sectortype*) // 1
|
|||
void FlareBurst(DBloodActor* actor, sectortype*) // 2
|
||||
{
|
||||
if (!actor) return;
|
||||
int nAngle = getangle(actor->vel.X, actor->vel.Y);
|
||||
int nAngle = getangle(actor->__int_vel.X, actor->__int_vel.Y);
|
||||
int nRadius = 0x55555;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
|
@ -108,9 +108,9 @@ void FlareBurst(DBloodActor* actor, sectortype*) // 2
|
|||
dz >>= 1;
|
||||
}
|
||||
RotateVector(&dx, &dy, nAngle);
|
||||
spawnedactor->vel.X += dx;
|
||||
spawnedactor->vel.Y += dy;
|
||||
spawnedactor->vel.Z += dz;
|
||||
spawnedactor->__int_vel.X += dx;
|
||||
spawnedactor->__int_vel.Y += dy;
|
||||
spawnedactor->__int_vel.Z += dz;
|
||||
evPostActor(spawnedactor, 960, kCallbackRemove);
|
||||
}
|
||||
evPostActor(actor, 0, kCallbackRemove);
|
||||
|
@ -128,9 +128,9 @@ void fxFlareSpark(DBloodActor* actor, sectortype*) // 3
|
|||
auto pFX = gFX.fxSpawnActor(FX_28, actor->sector(), actor->spr.pos, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel.X = actor->vel.X + Random2(0x1aaaa);
|
||||
pFX->vel.Y = actor->vel.Y + Random2(0x1aaaa);
|
||||
pFX->vel.Z = actor->vel.Z - Random(0x1aaaa);
|
||||
pFX->__int_vel.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);
|
||||
}
|
||||
evPostActor(actor, 4, kCallbackFXFlareSpark);
|
||||
}
|
||||
|
@ -147,9 +147,9 @@ void fxFlareSparkLite(DBloodActor* actor, sectortype*) // 4
|
|||
auto pFX = gFX.fxSpawnActor(FX_28, actor->sector(), actor->spr.pos, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel.X = actor->vel.X + Random2(0x1aaaa);
|
||||
pFX->vel.Y = actor->vel.Y + Random2(0x1aaaa);
|
||||
pFX->vel.Z = actor->vel.Z - Random(0x1aaaa);
|
||||
pFX->__int_vel.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);
|
||||
}
|
||||
evPostActor(actor, 12, kCallbackFXFlareSparkLite);
|
||||
}
|
||||
|
@ -169,9 +169,9 @@ void fxZombieBloodSpurt(DBloodActor* actor, sectortype*) // 5
|
|||
auto pFX = gFX.fxSpawnActor(FX_27, actor->sector(), DVector3(actor->spr.pos.XY(), top), 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel.X = actor->vel.X + Random2(0x11111);
|
||||
pFX->vel.Y = actor->vel.Y + Random2(0x11111);
|
||||
pFX->vel.Z = actor->vel.Z - 0x6aaaa;
|
||||
pFX->__int_vel.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;
|
||||
}
|
||||
if (actor->xspr.data1 > 0)
|
||||
{
|
||||
|
@ -199,9 +199,9 @@ void fxBloodSpurt(DBloodActor* actor, sectortype*) // 6
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_ang(0);
|
||||
pFX->vel.X = actor->vel.X >> 8;
|
||||
pFX->vel.Y = actor->vel.Y >> 8;
|
||||
pFX->vel.Z = actor->vel.Z >> 8;
|
||||
pFX->__int_vel.X = actor->__int_vel.X >> 8;
|
||||
pFX->__int_vel.Y = actor->__int_vel.Y >> 8;
|
||||
pFX->__int_vel.Z = actor->__int_vel.Z >> 8;
|
||||
}
|
||||
evPostActor(actor, 6, kCallbackFXBloodSpurt);
|
||||
}
|
||||
|
@ -218,9 +218,9 @@ void fxArcSpark(DBloodActor* actor, sectortype*) // 7
|
|||
auto pFX = gFX.fxSpawnActor(FX_15, actor->sector(), actor->spr.pos, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel.X = actor->vel.X + Random2(0x10000);
|
||||
pFX->vel.Y = actor->vel.Y + Random2(0x10000);
|
||||
pFX->vel.Z = actor->vel.Z - Random(0x1aaaa);
|
||||
pFX->__int_vel.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);
|
||||
}
|
||||
evPostActor(actor, 3, kCallbackFXArcSpark);
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ void fxArcSpark(DBloodActor* actor, sectortype*) // 7
|
|||
void fxDynPuff(DBloodActor* actor, sectortype*) // 8
|
||||
{
|
||||
if (!actor) return;
|
||||
if (actor->vel.Z)
|
||||
if (actor->__int_vel.Z)
|
||||
{
|
||||
int nDist = (actor->spr.xrepeat * (tileWidth(actor->spr.picnum) / 2)) >> 2;
|
||||
int x = actor->int_pos().X + MulScale(nDist, Cos(actor->int_ang() - 512), 30);
|
||||
|
@ -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->vel.X = actor->vel.X;
|
||||
pFX->vel.Y = actor->vel.Y;
|
||||
pFX->vel.Z = actor->vel.Z;
|
||||
pFX->__int_vel.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,9 +367,9 @@ 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->vel.X = actor->vel.X + Random2(0x1aaaa);
|
||||
pFX->vel.Y = actor->vel.Y + Random2(0x1aaaa);
|
||||
pFX->vel.Z = actor->vel.Z + Random2(0x1aaaa);
|
||||
pFX->__int_vel.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);
|
||||
}
|
||||
}
|
||||
evPostActor(actor, 4, kCallbackPlayerBubble);
|
||||
|
@ -387,7 +387,7 @@ void EnemyBubble(DBloodActor* actor, sectortype*) // 11
|
|||
if (!actor) return;
|
||||
int top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
for (int i = 0; i < (abs(actor->vel.Z) >> 18); i++)
|
||||
for (int i = 0; i < (abs(actor->__int_vel.Z) >> 18); i++)
|
||||
{
|
||||
int nDist = (actor->spr.xrepeat * (tileWidth(actor->spr.picnum) / 2)) >> 2;
|
||||
int nAngle = Random(2048);
|
||||
|
@ -397,9 +397,9 @@ 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->vel.X = actor->vel.X + Random2(0x1aaaa);
|
||||
pFX->vel.Y = actor->vel.Y + Random2(0x1aaaa);
|
||||
pFX->vel.Z = actor->vel.Z + Random2(0x1aaaa);
|
||||
pFX->__int_vel.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);
|
||||
}
|
||||
}
|
||||
evPostActor(actor, 4, kCallbackEnemeyBubble);
|
||||
|
@ -494,9 +494,9 @@ void fxTeslaAlt(DBloodActor* actor, sectortype*) // 15
|
|||
auto pFX = gFX.fxSpawnActor(FX_49, actor->sector(), actor->spr.pos, 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel.X = actor->vel.X + Random2(0x1aaaa);
|
||||
pFX->vel.Y = actor->vel.Y + Random2(0x1aaaa);
|
||||
pFX->vel.Z = actor->vel.Z - Random(0x1aaaa);
|
||||
pFX->__int_vel.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);
|
||||
}
|
||||
evPostActor(actor, 3, kCallbackFXTeslaAlt);
|
||||
}
|
||||
|
@ -521,13 +521,13 @@ void fxBouncingSleeve(DBloodActor* actor, sectortype*) // 16
|
|||
int top, bottom; GetActorExtents(actor, &top, &bottom);
|
||||
actor->add_int_z(floorZ - bottom);
|
||||
|
||||
int zv = actor->vel.Z - actor->sector()->velFloor;
|
||||
int zv = actor->__int_vel.Z - actor->sector()->velFloor;
|
||||
|
||||
if (actor->vel.Z == 0) sleeveStopBouncing(actor);
|
||||
if (actor->__int_vel.Z == 0) sleeveStopBouncing(actor);
|
||||
else if (zv > 0) {
|
||||
actFloorBounceVector((int*)&actor->vel.X, (int*)&actor->vel.Y, &zv, actor->sector(), 0x9000);
|
||||
actor->vel.Z = zv;
|
||||
if (actor->sector()->velFloor == 0 && abs(actor->vel.Z) < 0x20000) {
|
||||
actFloorBounceVector((int*)&actor->__int_vel.X, (int*)&actor->__int_vel.Y, &zv, actor->sector(), 0x9000);
|
||||
actor->__int_vel.Z = zv;
|
||||
if (actor->sector()->velFloor == 0 && abs(actor->__int_vel.Z) < 0x20000) {
|
||||
sleeveStopBouncing(actor);
|
||||
return;
|
||||
}
|
||||
|
@ -626,9 +626,9 @@ void fxPodBloodSpray(DBloodActor* actor, sectortype*) // 18
|
|||
if (pFX)
|
||||
{
|
||||
pFX->set_int_ang(0);
|
||||
pFX->vel.X = actor->vel.X >> 8;
|
||||
pFX->vel.Y = actor->vel.Y >> 8;
|
||||
pFX->vel.Z = actor->vel.Z >> 8;
|
||||
pFX->__int_vel.X = actor->__int_vel.X >> 8;
|
||||
pFX->__int_vel.Y = actor->__int_vel.Y >> 8;
|
||||
pFX->__int_vel.Z = actor->__int_vel.Z >> 8;
|
||||
}
|
||||
evPostActor(actor, 6, kCallbackFXPodBloodSpray);
|
||||
}
|
||||
|
|
|
@ -214,9 +214,9 @@ void CFX::fxProcess(void)
|
|||
assert(actor->spr.type < kFXMax);
|
||||
FXDATA* pFXData = &gFXData[actor->spr.type];
|
||||
actAirDrag(actor, pFXData->drag);
|
||||
actor->add_int_pos({ actor->vel.X >> 12, actor->vel.Y >> 12, actor->vel.Z >> 8 });
|
||||
actor->add_int_pos({ actor->__int_vel.X >> 12, actor->__int_vel.Y >> 12, actor->__int_vel.Z >> 8 });
|
||||
// Weird...
|
||||
if (actor->vel.X || (actor->vel.Y && actor->spr.pos.Z >= actor->sector()->floorz))
|
||||
if (actor->__int_vel.X || (actor->__int_vel.Y && actor->spr.pos.Z >= actor->sector()->floorz))
|
||||
{
|
||||
updatesector(actor->spr.pos, &pSector);
|
||||
if (pSector == nullptr)
|
||||
|
@ -240,7 +240,7 @@ void CFX::fxProcess(void)
|
|||
ChangeActorSect(actor, pSector);
|
||||
}
|
||||
}
|
||||
if (actor->vel.X || actor->vel.Y || actor->vel.Z)
|
||||
if (actor->__int_vel.X || actor->__int_vel.Y || actor->__int_vel.Z)
|
||||
{
|
||||
int32_t floorZ, ceilZ;
|
||||
getzsofslopeptr(pSector, actor->spr.pos, &ceilZ, &floorZ);
|
||||
|
@ -260,7 +260,7 @@ void CFX::fxProcess(void)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
actor->vel.Z += pFXData->gravity;
|
||||
actor->__int_vel.Z += pFXData->gravity;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,9 +283,9 @@ void fxSpawnBlood(DBloodActor* actor, int)
|
|||
if (bloodactor)
|
||||
{
|
||||
bloodactor->set_int_ang(1024);
|
||||
bloodactor->vel.X = Random2(0x6aaaa);
|
||||
bloodactor->vel.Y = Random2(0x6aaaa);
|
||||
bloodactor->vel.Z = -(int)Random(0x10aaaa) - 100;
|
||||
bloodactor->__int_vel.X = Random2(0x6aaaa);
|
||||
bloodactor->__int_vel.Y = Random2(0x6aaaa);
|
||||
bloodactor->__int_vel.Z = -(int)Random(0x10aaaa) - 100;
|
||||
evPostActor(bloodactor, 8, kCallbackFXBloodSpurt);
|
||||
}
|
||||
}
|
||||
|
@ -313,9 +313,9 @@ void fxSpawnPodStuff(DBloodActor* actor, int)
|
|||
if (spawnactor)
|
||||
{
|
||||
spawnactor->set_int_ang(1024);
|
||||
spawnactor->vel.X = Random2(0x6aaaa);
|
||||
spawnactor->vel.Y = Random2(0x6aaaa);
|
||||
spawnactor->vel.Z = -(int)Random(0x10aaaa) - 100;
|
||||
spawnactor->__int_vel.X = Random2(0x6aaaa);
|
||||
spawnactor->__int_vel.Y = Random2(0x6aaaa);
|
||||
spawnactor->__int_vel.Z = -(int)Random(0x10aaaa) - 100;
|
||||
evPostActor(spawnactor, 8, kCallbackFXPodBloodSpray);
|
||||
}
|
||||
}
|
||||
|
@ -339,9 +339,9 @@ 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->vel.X = MulScale(nDist, Cos(nAngle), 30);
|
||||
pBrass->vel.Y = MulScale(nDist, Sin(nAngle), 30);
|
||||
pBrass->vel.Z = actor->vel.Z - (0x20000 + (Random2(40) << 18) / 120);
|
||||
pBrass->__int_vel.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,9 +364,9 @@ 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->vel.X = MulScale(nDist, Cos(nAngle), 30);
|
||||
pShell->vel.Y = MulScale(nDist, Sin(nAngle), 30);
|
||||
pShell->vel.Z = actor->vel.Z - (0x20000 + (Random2(20) << 18) / 120);
|
||||
pShell->__int_vel.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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -300,34 +300,34 @@ void GibFX(DBloodActor* actor, GIBFX* pGFX, DVector3* pPos, CGibVelocity* pVel)
|
|||
pFX->spr.pal = actor->spr.pal;
|
||||
if (pVel)
|
||||
{
|
||||
pFX->vel.X = pVel->vx + Random2(pGFX->atd);
|
||||
pFX->vel.Y = pVel->vy + Random2(pGFX->atd);
|
||||
pFX->vel.Z = pVel->vz - Random(pGFX->at11);
|
||||
pFX->__int_vel.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->vel.X = Random2((pGFX->atd << 18) / 120);
|
||||
pFX->vel.Y = Random2((pGFX->atd << 18) / 120);
|
||||
pFX->__int_vel.X = Random2((pGFX->atd << 18) / 120);
|
||||
pFX->__int_vel.Y = Random2((pGFX->atd << 18) / 120);
|
||||
switch (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK)
|
||||
{
|
||||
case 16:
|
||||
pFX->vel.Z = Random2((pGFX->at11 << 18) / 120);
|
||||
pFX->__int_vel.Z = Random2((pGFX->at11 << 18) / 120);
|
||||
break;
|
||||
default:
|
||||
if (dz2 < dz1 && dz2 < 0x4000)
|
||||
{
|
||||
pFX->vel.Z = 0;
|
||||
pFX->__int_vel.Z = 0;
|
||||
}
|
||||
else if (dz2 > dz1 && dz1 < 0x4000)
|
||||
{
|
||||
pFX->vel.Z = -(int)Random((abs(pGFX->at11) << 18) / 120);
|
||||
pFX->__int_vel.Z = -(int)Random((abs(pGFX->at11) << 18) / 120);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((pGFX->at11 << 18) / 120 < 0)
|
||||
pFX->vel.Z = -(int)Random((abs(pGFX->at11) << 18) / 120);
|
||||
pFX->__int_vel.Z = -(int)Random((abs(pGFX->at11) << 18) / 120);
|
||||
else
|
||||
pFX->vel.Z = Random2((pGFX->at11 << 18) / 120);
|
||||
pFX->__int_vel.Z = Random2((pGFX->at11 << 18) / 120);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -381,31 +381,31 @@ void GibThing(DBloodActor* actor, GIBTHING* pGThing, DVector3* pPos, CGibVelocit
|
|||
gibactor->spr.picnum = pGThing->Kills;
|
||||
if (pVel)
|
||||
{
|
||||
gibactor->vel.X = pVel->vx + Random2(pGThing->atc);
|
||||
gibactor->vel.Y = pVel->vy + Random2(pGThing->atc);
|
||||
gibactor->vel.Z = pVel->vz - Random(pGThing->at10);
|
||||
gibactor->__int_vel.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->vel.X = Random2((pGThing->atc << 18) / 120);
|
||||
gibactor->vel.Y = Random2((pGThing->atc << 18) / 120);
|
||||
gibactor->__int_vel.X = Random2((pGThing->atc << 18) / 120);
|
||||
gibactor->__int_vel.Y = Random2((pGThing->atc << 18) / 120);
|
||||
switch (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK)
|
||||
{
|
||||
case 16:
|
||||
gibactor->vel.Z = Random2((pGThing->at10 << 18) / 120);
|
||||
gibactor->__int_vel.Z = Random2((pGThing->at10 << 18) / 120);
|
||||
break;
|
||||
default:
|
||||
if (dz2 < dz1 && dz2 < 0x4000)
|
||||
{
|
||||
gibactor->vel.Z = 0;
|
||||
gibactor->__int_vel.Z = 0;
|
||||
}
|
||||
else if (dz2 > dz1 && dz1 < 0x4000)
|
||||
{
|
||||
gibactor->vel.Z = -(int)Random((pGThing->at10 << 18) / 120);
|
||||
gibactor->__int_vel.Z = -(int)Random((pGThing->at10 << 18) / 120);
|
||||
}
|
||||
else
|
||||
{
|
||||
gibactor->vel.Z = Random2((pGThing->at10 << 18) / 120);
|
||||
gibactor->__int_vel.Z = Random2((pGThing->at10 << 18) / 120);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -464,15 +464,15 @@ void GibFX(walltype* pWall, GIBFX* pGFX, int a3, int a4, int a5, int a6, CGibVel
|
|||
pGib->spr.pal = pWall->pal;
|
||||
if (!pVel)
|
||||
{
|
||||
pGib->vel.X = Random2((pGFX->atd << 18) / 120);
|
||||
pGib->vel.Y = Random2((pGFX->atd << 18) / 120);
|
||||
pGib->vel.Z = -(int)Random((pGFX->at11 << 18) / 120);
|
||||
pGib->__int_vel.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->vel.X = Random2((pVel->vx << 18) / 120);
|
||||
pGib->vel.Y = Random2((pVel->vy << 18) / 120);
|
||||
pGib->vel.Z = -(int)Random((pVel->vz << 18) / 120);
|
||||
pGib->__int_vel.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1040,7 +1040,7 @@ static void windGenDoVerticalWind(int factor, sectortype* pSector)
|
|||
case kStatFree:
|
||||
continue;
|
||||
case kStatFX:
|
||||
if (actor->vel.Z) break;
|
||||
if (actor->__int_vel.Z) break;
|
||||
continue;
|
||||
case kStatThing:
|
||||
case kStatDude:
|
||||
|
@ -1054,16 +1054,16 @@ static void windGenDoVerticalWind(int factor, sectortype* pSector)
|
|||
if (maxZfound && actor->int_pos().Z <= maxZ)
|
||||
{
|
||||
zdiff = actor->int_pos().Z - maxZ;
|
||||
if (actor->vel.Z < 0) actor->vel.Z += MulScale(actor->vel.Z >> 4, zdiff, 16);
|
||||
if (actor->__int_vel.Z < 0) actor->__int_vel.Z += MulScale(actor->__int_vel.Z >> 4, zdiff, 16);
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
val = -MulScale(factor * 64, 0x10000, 16);
|
||||
if (actor->vel.Z >= 0) actor->vel.Z += val;
|
||||
else actor->vel.Z = val;
|
||||
if (actor->__int_vel.Z >= 0) actor->__int_vel.Z += val;
|
||||
else actor->__int_vel.Z = val;
|
||||
|
||||
actor->add_int_z(actor->vel.Z >> 12);
|
||||
actor->add_int_z(actor->__int_vel.Z >> 12);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1314,8 +1314,8 @@ void nnExtProcessSuperSprites()
|
|||
angle = (angle + GetWallAngle(debrisactor->sector()->firstWall()) + 512) & 2047;
|
||||
int dx = MulScale(speed, Cos(angle), 30);
|
||||
int dy = MulScale(speed, Sin(angle), 30);
|
||||
debrisactor->vel.X += dx;
|
||||
debrisactor->vel.Y += dy;
|
||||
debrisactor->__int_vel.X += dx;
|
||||
debrisactor->__int_vel.Y += dy;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1331,11 +1331,11 @@ void nnExtProcessSuperSprites()
|
|||
|
||||
if (pact && pact->hit.hit.type == kHitSprite && pact->hit.hit.actor() == debrisactor)
|
||||
{
|
||||
int nSpeed = approxDist(pact->vel.X, pact->vel.Y);
|
||||
int nSpeed = approxDist(pact->__int_vel.X, pact->__int_vel.Y);
|
||||
nSpeed = ClipLow(nSpeed - MulScale(nSpeed, mass, 6), 0x9000 - (mass << 3));
|
||||
|
||||
debrisactor->vel.X += MulScale(nSpeed, Cos(pPlayer->actor->int_ang()), 30);
|
||||
debrisactor->vel.Y += MulScale(nSpeed, Sin(pPlayer->actor->int_ang()), 30);
|
||||
debrisactor->__int_vel.X += MulScale(nSpeed, Cos(pPlayer->actor->int_ang()), 30);
|
||||
debrisactor->__int_vel.Y += MulScale(nSpeed, Sin(pPlayer->actor->int_ang()), 30);
|
||||
|
||||
debrisactor->hit.hit.setSprite(pPlayer->actor);
|
||||
}
|
||||
|
@ -1343,17 +1343,17 @@ void nnExtProcessSuperSprites()
|
|||
}
|
||||
|
||||
if (debrisactor->xspr.physAttr & kPhysGravity) debrisactor->xspr.physAttr |= kPhysFalling;
|
||||
if ((debrisactor->xspr.physAttr & kPhysFalling) || debrisactor->vel.X || debrisactor->vel.Y || debrisactor->vel.Z || debrisactor->sector()->velFloor || debrisactor->sector()->velCeil)
|
||||
if ((debrisactor->xspr.physAttr & kPhysFalling) || debrisactor->__int_vel.X || debrisactor->__int_vel.Y || debrisactor->__int_vel.Z || debrisactor->sector()->velFloor || debrisactor->sector()->velCeil)
|
||||
debrisMove(i);
|
||||
|
||||
if (debrisactor->vel.X || debrisactor->vel.Y)
|
||||
debrisactor->xspr.goalAng = getangle(debrisactor->vel.X, debrisactor->vel.Y) & 2047;
|
||||
if (debrisactor->__int_vel.X || debrisactor->__int_vel.Y)
|
||||
debrisactor->xspr.goalAng = getangle(debrisactor->__int_vel.X, debrisactor->__int_vel.Y) & 2047;
|
||||
|
||||
int ang = debrisactor->int_ang() & 2047;
|
||||
if ((uwater = spriteIsUnderwater(debrisactor)) == false) evKillActor(debrisactor, kCallbackEnemeyBubble);
|
||||
else if (Chance(0x1000 - mass))
|
||||
{
|
||||
if (debrisactor->vel.Z > 0x100) debrisBubble(debrisactor);
|
||||
if (debrisactor->__int_vel.Z > 0x100) debrisBubble(debrisactor);
|
||||
if (ang == debrisactor->xspr.goalAng)
|
||||
{
|
||||
debrisactor->xspr.goalAng = (debrisactor->int_ang() + Random3(kAng60)) & 2047;
|
||||
|
@ -1361,7 +1361,7 @@ void nnExtProcessSuperSprites()
|
|||
}
|
||||
}
|
||||
|
||||
int angStep = ClipLow(mulscale8(1, ((abs(debrisactor->vel.X) + abs(debrisactor->vel.Y)) >> 5)), (uwater) ? 1 : 0);
|
||||
int angStep = ClipLow(mulscale8(1, ((abs(debrisactor->__int_vel.X) + abs(debrisactor->__int_vel.Y)) >> 5)), (uwater) ? 1 : 0);
|
||||
if (ang < debrisactor->xspr.goalAng) debrisactor->set_int_ang(ClipHigh(ang + angStep, debrisactor->xspr.goalAng));
|
||||
else if (ang > debrisactor->xspr.goalAng) debrisactor->set_int_ang(ClipLow(ang - angStep, debrisactor->xspr.goalAng));
|
||||
|
||||
|
@ -1581,9 +1581,9 @@ void debrisConcuss(DBloodActor* owneractor, int listIndex, int x, int y, int z,
|
|||
{
|
||||
int t = Scale(dmg, size, actor->spriteMass.mass);
|
||||
|
||||
actor->vel.X += MulScale(t, dx, 16);
|
||||
actor->vel.Y += MulScale(t, dy, 16);
|
||||
actor->vel.Z += MulScale(t, dz, 16);
|
||||
actor->__int_vel.X += MulScale(t, dx, 16);
|
||||
actor->__int_vel.Y += MulScale(t, dy, 16);
|
||||
actor->__int_vel.Z += MulScale(t, dz, 16);
|
||||
}
|
||||
|
||||
if (thing)
|
||||
|
@ -1616,9 +1616,9 @@ 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->vel.X = actor->vel.X + Random2(0x1aaaa);
|
||||
pFX->vel.Y = actor->vel.Y + Random2(0x1aaaa);
|
||||
pFX->vel.Z = actor->vel.Z + Random2(0x1aaaa);
|
||||
pFX->__int_vel.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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1662,14 +1662,14 @@ void debrisMove(int listIndex)
|
|||
uwater = true;
|
||||
}
|
||||
|
||||
if (actor->vel.X || actor->vel.Y)
|
||||
if (actor->__int_vel.X || actor->__int_vel.Y)
|
||||
{
|
||||
|
||||
auto oldcstat = actor->spr.cstat;
|
||||
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.X >> 12,
|
||||
actor->vel.Y >> 12, clipDist, ceilDist, floorDist, CLIPMASK0, moveHit);
|
||||
ClipMove(actor->spr.pos, &pSector, actor->__int_vel.X >> 12,
|
||||
actor->__int_vel.Y >> 12, clipDist, ceilDist, floorDist, CLIPMASK0, moveHit);
|
||||
actor->hit.hit = moveHit;
|
||||
|
||||
actor->spr.cstat = oldcstat;
|
||||
|
@ -1689,7 +1689,7 @@ void debrisMove(int listIndex)
|
|||
if (actor->hit.hit.type == kHitWall)
|
||||
{
|
||||
moveHit = actor->hit.hit;
|
||||
actWallBounceVector(&actor->vel.X, &actor->vel.Y, moveHit.hitWall, tmpFraction);
|
||||
actWallBounceVector(&actor->__int_vel.X, &actor->__int_vel.Y, moveHit.hitWall, tmpFraction);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1709,8 +1709,8 @@ void debrisMove(int listIndex)
|
|||
if (pSector->hasX())
|
||||
uwater = pSector->xs().Underwater;
|
||||
|
||||
if (actor->vel.Z)
|
||||
actor->add_int_z(actor->vel.Z >> 8);
|
||||
if (actor->__int_vel.Z)
|
||||
actor->add_int_z(actor->__int_vel.Z >> 8);
|
||||
|
||||
int ceilZ, floorZ;
|
||||
Collision ceilColl, floorColl;
|
||||
|
@ -1726,7 +1726,7 @@ void debrisMove(int listIndex)
|
|||
|
||||
if (pSector->lowerLink) cz += (cz < 0) ? 0x500 : -0x500;
|
||||
if (top > cz && (!(actor->xspr.physAttr & kPhysDebrisFloat) || fz <= bottom << 2))
|
||||
actor->vel.Z -= DivScale((bottom - ceilZ) >> 6, mass, 8);
|
||||
actor->__int_vel.Z -= DivScale((bottom - ceilZ) >> 6, mass, 8);
|
||||
|
||||
if (fz < bottom)
|
||||
vc = 58254 + ((bottom - fz) * -80099) / div;
|
||||
|
@ -1734,14 +1734,14 @@ void debrisMove(int listIndex)
|
|||
if (vc)
|
||||
{
|
||||
actor->add_int_z(((vc << 2) >> 1) >> 8);
|
||||
actor->vel.Z += vc;
|
||||
actor->__int_vel.Z += vc;
|
||||
}
|
||||
|
||||
}
|
||||
else if ((actor->xspr.physAttr & kPhysGravity) && bottom < floorZ)
|
||||
{
|
||||
actor->spr.pos.Z += 1.777;
|
||||
actor->vel.Z += 58254;
|
||||
actor->__int_vel.Z += 58254;
|
||||
|
||||
}
|
||||
|
||||
|
@ -1780,17 +1780,17 @@ void debrisMove(int listIndex)
|
|||
if (floorZ <= bottom) {
|
||||
|
||||
actor->hit.florhit = floorColl;
|
||||
int v30 = actor->vel.Z - actor->sector()->velFloor;
|
||||
int v30 = actor->__int_vel.Z - actor->sector()->velFloor;
|
||||
|
||||
if (v30 > 0)
|
||||
{
|
||||
actor->xspr.physAttr |= kPhysFalling;
|
||||
actFloorBounceVector(&actor->vel.X, &actor->vel.Y, &v30, actor->sector(), tmpFraction);
|
||||
actor->vel.Z = v30;
|
||||
actFloorBounceVector(&actor->__int_vel.X, &actor->__int_vel.Y, &v30, actor->sector(), tmpFraction);
|
||||
actor->__int_vel.Z = v30;
|
||||
|
||||
if (abs(actor->vel.Z) < 0x10000)
|
||||
if (abs(actor->__int_vel.Z) < 0x10000)
|
||||
{
|
||||
actor->vel.Z = actor->sector()->velFloor;
|
||||
actor->__int_vel.Z = actor->sector()->velFloor;
|
||||
actor->xspr.physAttr &= ~kPhysFalling;
|
||||
}
|
||||
|
||||
|
@ -1804,9 +1804,9 @@ 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->vel.X = Random2(0x6aaaa);
|
||||
pFX2->vel.Y = Random2(0x6aaaa);
|
||||
pFX2->vel.Z = -(int)Random(0xd5555);
|
||||
pFX2->__int_vel.X = Random2(0x6aaaa);
|
||||
pFX2->__int_vel.Y = Random2(0x6aaaa);
|
||||
pFX2->__int_vel.Z = -(int)Random(0xd5555);
|
||||
}
|
||||
break;
|
||||
case kSurfWater:
|
||||
|
@ -1815,7 +1815,7 @@ void debrisMove(int listIndex)
|
|||
}
|
||||
|
||||
}
|
||||
else if (actor->vel.Z == 0)
|
||||
else if (actor->__int_vel.Z == 0)
|
||||
{
|
||||
actor->xspr.physAttr &= ~kPhysFalling;
|
||||
}
|
||||
|
@ -1831,8 +1831,8 @@ void debrisMove(int listIndex)
|
|||
{
|
||||
actor->hit.ceilhit = moveHit = ceilColl;
|
||||
actor->add_int_z(ClipLow(ceilZ - top, 0));
|
||||
if (actor->vel.Z <= 0 && (actor->xspr.physAttr & kPhysFalling))
|
||||
actor->vel.Z = MulScale(-actor->vel.Z, 0x2000, 16);
|
||||
if (actor->__int_vel.Z <= 0 && (actor->xspr.physAttr & kPhysFalling))
|
||||
actor->__int_vel.Z = MulScale(-actor->__int_vel.Z, 0x2000, 16);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -1848,14 +1848,14 @@ void debrisMove(int listIndex)
|
|||
trTriggerSprite(actor, kCmdToggle, actor);
|
||||
}
|
||||
|
||||
if (!actor->vel.X && !actor->vel.Y) return;
|
||||
if (!actor->__int_vel.X && !actor->__int_vel.Y) return;
|
||||
else if (floorColl.type == kHitSprite)
|
||||
{
|
||||
|
||||
if ((floorColl.actor()->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0)
|
||||
{
|
||||
actor->vel.X += MulScale(4, actor->int_pos().X - floorColl.actor()->int_pos().X, 2);
|
||||
actor->vel.Y += MulScale(4, actor->int_pos().Y - floorColl.actor()->int_pos().Y, 2);
|
||||
actor->__int_vel.X += MulScale(4, actor->int_pos().X - floorColl.actor()->int_pos().X, 2);
|
||||
actor->__int_vel.Y += MulScale(4, actor->int_pos().Y - floorColl.actor()->int_pos().Y, 2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1868,10 +1868,10 @@ void debrisMove(int listIndex)
|
|||
if (actor->xspr.height > 0)
|
||||
nDrag -= Scale(nDrag, actor->xspr.height, 0x100);
|
||||
|
||||
actor->vel.X -= mulscale16r(actor->vel.X, nDrag);
|
||||
actor->vel.Y -= mulscale16r(actor->vel.Y, nDrag);
|
||||
if (approxDist(actor->vel.X, actor->vel.Y) < 0x1000)
|
||||
actor->vel.X = actor->vel.Y = 0;
|
||||
actor->__int_vel.X -= mulscale16r(actor->__int_vel.X, nDrag);
|
||||
actor->__int_vel.Y -= mulscale16r(actor->__int_vel.Y, nDrag);
|
||||
if (approxDist(actor->__int_vel.X, actor->__int_vel.Y) < 0x1000)
|
||||
actor->__int_vel.X = actor->__int_vel.Y = 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -2782,7 +2782,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
|
|||
if (targetactor->spr.statnum == kStatThing) ChangeActorStat(targetactor, 0);
|
||||
|
||||
// set random goal ang for swimming so they start turning
|
||||
if ((flags & kPhysDebrisSwim) && !targetactor->vel.X && !targetactor->vel.Y && !targetactor->vel.Z)
|
||||
if ((flags & kPhysDebrisSwim) && !targetactor->__int_vel.X && !targetactor->__int_vel.Y && !targetactor->__int_vel.Z)
|
||||
targetactor->xspr.goalAng = (targetactor->int_ang() + Random3(kAng45)) & 2047;
|
||||
|
||||
if (targetactor->xspr.physAttr & kPhysDebrisVector)
|
||||
|
@ -3118,15 +3118,15 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi
|
|||
|
||||
if (relative)
|
||||
{
|
||||
pSprite->vel.X += xv;
|
||||
pSprite->vel.Y += yv;
|
||||
pSprite->vel.Z += zv;
|
||||
pSprite->__int_vel.X += xv;
|
||||
pSprite->__int_vel.Y += yv;
|
||||
pSprite->__int_vel.Z += zv;
|
||||
}
|
||||
else
|
||||
{
|
||||
pSprite->vel.X = xv;
|
||||
pSprite->vel.Y = yv;
|
||||
pSprite->vel.Z = zv;
|
||||
pSprite->__int_vel.X = xv;
|
||||
pSprite->__int_vel.Y = yv;
|
||||
pSprite->__int_vel.Z = zv;
|
||||
}
|
||||
|
||||
vAng = getVelocityAngle(pSprite);
|
||||
|
@ -3134,9 +3134,9 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi
|
|||
if (toAng)
|
||||
{
|
||||
if (toAng180)
|
||||
RotatePoint(&pSprite->vel.X, &pSprite->vel.Y, kAng180, pSprite->int_pos().X, pSprite->int_pos().Y);
|
||||
RotatePoint(&pSprite->__int_vel.X, &pSprite->__int_vel.Y, kAng180, pSprite->int_pos().X, pSprite->int_pos().Y);
|
||||
else
|
||||
RotatePoint(&pSprite->vel.X, &pSprite->vel.Y, (nAng - vAng) & 2047, pSprite->int_pos().X, pSprite->int_pos().Y);
|
||||
RotatePoint(&pSprite->__int_vel.X, &pSprite->__int_vel.Y, (nAng - vAng) & 2047, pSprite->int_pos().X, pSprite->int_pos().Y);
|
||||
|
||||
|
||||
vAng = getVelocityAngle(pSprite);
|
||||
|
@ -3287,11 +3287,11 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
if (sourceactor->xspr.data3 & kModernTypeFlag2)
|
||||
{
|
||||
int vAng = getVelocityAngle(actor);
|
||||
RotatePoint(&actor->vel.X, &actor->vel.Y, (sourceactor->spr.int_ang() - vAng) & 2047, actor->int_pos().X, actor->int_pos().Y);
|
||||
RotatePoint(&actor->__int_vel.X, &actor->__int_vel.Y, (sourceactor->spr.int_ang() - vAng) & 2047, actor->int_pos().X, actor->int_pos().Y);
|
||||
}
|
||||
|
||||
if (sourceactor->xspr.data3 & kModernTypeFlag4)
|
||||
actor->vel.Z = 0;
|
||||
actor->__int_vel.Z = 0;
|
||||
}
|
||||
|
||||
if (sourceactor->xspr.data2 == 1)
|
||||
|
@ -4609,18 +4609,18 @@ bool condCheckSprite(DBloodActor* aCond, int cmpOp, bool PUSH)
|
|||
{
|
||||
if (arg1 == 0)
|
||||
{
|
||||
if ((var = condCmp(objActor->vel.X, arg1, arg2, cmpOp)) == true) return var;
|
||||
if ((var = condCmp(objActor->vel.Y, arg1, arg2, cmpOp)) == true) return var;
|
||||
if ((var = condCmp(objActor->vel.Z, arg1, arg2, cmpOp)) == true) return var;
|
||||
if ((var = condCmp(objActor->__int_vel.X, arg1, arg2, cmpOp)) == true) return var;
|
||||
if ((var = condCmp(objActor->__int_vel.Y, arg1, arg2, cmpOp)) == true) return var;
|
||||
if ((var = condCmp(objActor->__int_vel.Z, arg1, arg2, cmpOp)) == true) return var;
|
||||
}
|
||||
else if (arg1 == 1) return condCmp(objActor->vel.X, arg1, arg2, cmpOp);
|
||||
else if (arg1 == 2) return condCmp(objActor->vel.Y, arg1, arg2, cmpOp);
|
||||
else if (arg1 == 3) return condCmp(objActor->vel.Z, arg1, arg2, cmpOp);
|
||||
else if (arg1 == 1) return condCmp(objActor->__int_vel.X, arg1, arg2, cmpOp);
|
||||
else if (arg1 == 2) return condCmp(objActor->__int_vel.Y, arg1, arg2, cmpOp);
|
||||
else if (arg1 == 3) return condCmp(objActor->__int_vel.Z, arg1, arg2, cmpOp);
|
||||
}
|
||||
else if (arg1 == 0) return (objActor->vel.X || objActor->vel.Y || objActor->vel.Z);
|
||||
else if (arg1 == 1) return (objActor->vel.X);
|
||||
else if (arg1 == 2) return (objActor->vel.Y);
|
||||
else if (arg1 == 3) return (objActor->vel.Z);
|
||||
else if (arg1 == 0) return (objActor->__int_vel.X || objActor->__int_vel.Y || objActor->__int_vel.Z);
|
||||
else if (arg1 == 1) return (objActor->__int_vel.X);
|
||||
else if (arg1 == 2) return (objActor->__int_vel.Y);
|
||||
else if (arg1 == 3) return (objActor->__int_vel.Z);
|
||||
break;
|
||||
case 30:
|
||||
if (!spriteIsUnderwater(objActor) && !spriteIsUnderwater(objActor, true)) return false;
|
||||
|
@ -6568,9 +6568,9 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
if (sourceactor->xspr.data2 > 0)
|
||||
{
|
||||
int velocity = sourceactor->xspr.data2 << 12;
|
||||
missileactor->vel.X = MulScale(velocity, dx, 14);
|
||||
missileactor->vel.Y = MulScale(velocity, dy, 14);
|
||||
missileactor->vel.Z = MulScale(velocity, dz, 14);
|
||||
missileactor->__int_vel.X = MulScale(velocity, dx, 14);
|
||||
missileactor->__int_vel.Y = MulScale(velocity, dy, 14);
|
||||
missileactor->__int_vel.Z = MulScale(velocity, dz, 14);
|
||||
}
|
||||
|
||||
// add bursting for missiles
|
||||
|
@ -6796,12 +6796,12 @@ void useSlopeChanger(DBloodActor* sourceactor, int objType, sectortype* pSect, D
|
|||
if (iactor->hasX() && iactor->xspr.physAttr > 0)
|
||||
{
|
||||
iactor->xspr.physAttr |= kPhysFalling;
|
||||
iactor->vel.Z++;
|
||||
iactor->__int_vel.Z++;
|
||||
}
|
||||
else if ((iactor->spr.statnum == kStatThing || iactor->spr.statnum == kStatDude) && (iactor->spr.flags & kPhysGravity))
|
||||
{
|
||||
iactor->spr.flags |= kPhysFalling;
|
||||
iactor->vel.Z++;
|
||||
iactor->__int_vel.Z++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7724,7 +7724,7 @@ void nnExtAiSetDirection(DBloodActor* actor, int a3)
|
|||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
|
||||
int vc = getincangle(actor->int_ang(), a3);
|
||||
int t1 = DMulScale(actor->vel.X, Cos(actor->int_ang()), actor->vel.Y, Sin(actor->int_ang()), 30);
|
||||
int t1 = DMulScale(actor->__int_vel.X, Cos(actor->int_ang()), actor->__int_vel.Y, Sin(actor->int_ang()), 30);
|
||||
int vsi = ((t1 * 15) >> 12) / 2;
|
||||
int v8 = 341;
|
||||
|
||||
|
@ -8176,7 +8176,7 @@ void aiPatrolMove(DBloodActor* actor)
|
|||
if (pExtra->flying || spriteIsUnderwater(actor))
|
||||
{
|
||||
goalAng >>= 1;
|
||||
actor->vel.Z = dz;
|
||||
actor->__int_vel.Z = dz;
|
||||
if (actor->spr.flags & kPhysGravity)
|
||||
actor->spr.flags &= ~kPhysGravity;
|
||||
}
|
||||
|
@ -8191,8 +8191,8 @@ void aiPatrolMove(DBloodActor* actor)
|
|||
|
||||
if (abs(nAng) > goalAng || ((targetactor->xspr.waitTime > 0 || targetactor->xspr.data1 == targetactor->xspr.data2) && aiPatrolMarkerReached(actor)))
|
||||
{
|
||||
actor->vel.X = 0;
|
||||
actor->vel.Y = 0;
|
||||
actor->__int_vel.X = 0;
|
||||
actor->__int_vel.Y = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -8205,7 +8205,7 @@ void aiPatrolMove(DBloodActor* actor)
|
|||
if (hitactor->hasX() && hitactor->xspr.health)
|
||||
{
|
||||
hitactor->xspr.dodgeDir = (actor->xspr.dodgeDir > 0) ? -1 : 1;
|
||||
if (hitactor->vel.X || hitactor->vel.Y)
|
||||
if (hitactor->__int_vel.X || hitactor->__int_vel.Y)
|
||||
aiMoveDodge(hitactor);
|
||||
}
|
||||
}
|
||||
|
@ -8223,13 +8223,13 @@ void aiPatrolMove(DBloodActor* actor)
|
|||
}
|
||||
|
||||
frontSpeed = aiPatrolGetVelocity(pDudeInfo->frontSpeed, targetactor->xspr.busyTime);
|
||||
actor->vel.X += MulScale(frontSpeed, Cos(actor->int_ang()), 30);
|
||||
actor->vel.Y += MulScale(frontSpeed, Sin(actor->int_ang()), 30);
|
||||
actor->__int_vel.X += MulScale(frontSpeed, Cos(actor->int_ang()), 30);
|
||||
actor->__int_vel.Y += MulScale(frontSpeed, Sin(actor->int_ang()), 30);
|
||||
}
|
||||
|
||||
vel = MulScale(vel, approxDist(dx, dy) << 6, 16);
|
||||
actor->vel.X = ClipRange(actor->vel.X, -vel, vel);
|
||||
actor->vel.Y = ClipRange(actor->vel.Y, -vel, vel);
|
||||
actor->__int_vel.X = ClipRange(actor->__int_vel.X, -vel, vel);
|
||||
actor->__int_vel.Y = ClipRange(actor->__int_vel.Y, -vel, vel);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -8575,8 +8575,8 @@ DBloodActor* aiPatrolSearchTargets(DBloodActor* actor)
|
|||
{
|
||||
DBloodActor* act = pPlayer->actor;
|
||||
itCanHear = (!deaf && (nDist < hearDist || hearChance > 0));
|
||||
if (act && itCanHear && nDist < feelDist && (act->vel.X || act->vel.Y || act->vel.Z))
|
||||
hearChance += ClipLow(mulscale8(1, ClipLow(((feelDist - nDist) + (abs(act->vel.X) + abs(act->vel.Y) + abs(act->vel.Z))) >> 6, 0)), 0);
|
||||
if (act && itCanHear && nDist < feelDist && (act->__int_vel.X || act->__int_vel.Y || act->__int_vel.Z))
|
||||
hearChance += ClipLow(mulscale8(1, ClipLow(((feelDist - nDist) + (abs(act->__int_vel.X) + abs(act->__int_vel.Y) + abs(act->__int_vel.Z))) >> 6, 0)), 0);
|
||||
}
|
||||
|
||||
if (seeDist)
|
||||
|
@ -8815,7 +8815,7 @@ void aiPatrolThink(DBloodActor* actor)
|
|||
if (actor->xspr.stateTimer > 0 || markeractor->xspr.data1 == markeractor->xspr.data2)
|
||||
{
|
||||
if (pExtra->flying)
|
||||
actor->vel.Z = Random2(0x8000);
|
||||
actor->__int_vel.Z = Random2(0x8000);
|
||||
|
||||
// turn while waiting
|
||||
if (markeractor->spr.flags & kModernTypeFlag16)
|
||||
|
@ -9192,7 +9192,7 @@ void callbackUniMissileBurst(DBloodActor* actor, sectortype*) // 22
|
|||
{
|
||||
if (!actor) return;
|
||||
if (actor->spr.statnum != kStatProjectile) return;
|
||||
int nAngle = getangle(actor->vel.X, actor->vel.Y);
|
||||
int nAngle = getangle(actor->__int_vel.X, actor->__int_vel.Y);
|
||||
int nRadius = 0x55555;
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
|
@ -9232,9 +9232,9 @@ void callbackUniMissileBurst(DBloodActor* actor, sectortype*) // 22
|
|||
dz >>= 1;
|
||||
}
|
||||
RotateVector(&dx, &dy, nAngle);
|
||||
burstactor->vel.X += dx;
|
||||
burstactor->vel.Y += dy;
|
||||
burstactor->vel.Z += dz;
|
||||
burstactor->__int_vel.X += dx;
|
||||
burstactor->__int_vel.Y += dy;
|
||||
burstactor->__int_vel.Z += dz;
|
||||
evPostActor(burstactor, 960, kCallbackRemove);
|
||||
}
|
||||
evPostActor(actor, 0, kCallbackRemove);
|
||||
|
@ -9297,7 +9297,7 @@ void triggerTouchSprite(DBloodActor* actor, DBloodActor* hActor)
|
|||
trTriggerSprite(hActor, kCmdSpriteTouch, actor);
|
||||
|
||||
// enough to reset gSpriteHit values
|
||||
actor->vel.X += 5;
|
||||
actor->__int_vel.X += 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9309,7 +9309,7 @@ void triggerTouchWall(DBloodActor* actor, walltype* pHWall)
|
|||
trTriggerWall(pHWall, kCmdWallTouch, actor);
|
||||
|
||||
// enough to reset gSpriteHit values
|
||||
actor->vel.X += 5;
|
||||
actor->__int_vel.X += 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9333,7 +9333,7 @@ void changeSpriteAngle(DBloodActor* pSpr, int nAng)
|
|||
|
||||
int getVelocityAngle(DBloodActor* pSpr)
|
||||
{
|
||||
return getangle(pSpr->vel.X >> 12, pSpr->vel.Y >> 12);
|
||||
return getangle(pSpr->__int_vel.X >> 12, pSpr->__int_vel.Y >> 12);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -1451,9 +1451,9 @@ int ActionScan(PLAYER* pPlayer, HitInfo* out)
|
|||
if (nMass)
|
||||
{
|
||||
int t2 = DivScale(0xccccc, nMass, 8);
|
||||
hitactor->vel.X += MulScale(x, t2, 16);
|
||||
hitactor->vel.Y += MulScale(y, t2, 16);
|
||||
hitactor->vel.Z += MulScale(z, t2, 16);
|
||||
hitactor->__int_vel.X += MulScale(x, t2, 16);
|
||||
hitactor->__int_vel.Y += MulScale(y, t2, 16);
|
||||
hitactor->__int_vel.Z += MulScale(z, t2, 16);
|
||||
}
|
||||
if (hitactor->xspr.Push && !hitactor->xspr.state && !hitactor->xspr.isTriggered)
|
||||
trTriggerSprite(hitactor, kCmdSpritePush);
|
||||
|
@ -1600,15 +1600,15 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
forward = MulScale(pPosture->frontAccel, forward, 8);
|
||||
else
|
||||
forward = MulScale(pPosture->backAccel, forward, 8);
|
||||
actor->vel.X += MulScale(forward, x, 30);
|
||||
actor->vel.Y += MulScale(forward, y, 30);
|
||||
actor->__int_vel.X += MulScale(forward, x, 30);
|
||||
actor->__int_vel.Y += MulScale(forward, y, 30);
|
||||
}
|
||||
if (pInput->svel)
|
||||
{
|
||||
int strafe = pInput->svel;
|
||||
strafe = MulScale(pPosture->sideAccel, strafe, 8);
|
||||
actor->vel.X += MulScale(strafe, y, 30);
|
||||
actor->vel.Y -= MulScale(strafe, x, 30);
|
||||
actor->__int_vel.X += MulScale(strafe, y, 30);
|
||||
actor->__int_vel.Y -= MulScale(strafe, x, 30);
|
||||
}
|
||||
}
|
||||
else if (actor->xspr.height < 256)
|
||||
|
@ -1627,8 +1627,8 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
forward = MulScale(pPosture->backAccel, forward, 8);
|
||||
if (actor->xspr.height)
|
||||
forward = MulScale(forward, speed, 16);
|
||||
actor->vel.X += MulScale(forward, x, 30);
|
||||
actor->vel.Y += MulScale(forward, y, 30);
|
||||
actor->__int_vel.X += MulScale(forward, x, 30);
|
||||
actor->__int_vel.Y += MulScale(forward, y, 30);
|
||||
}
|
||||
if (pInput->svel)
|
||||
{
|
||||
|
@ -1636,8 +1636,8 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
strafe = MulScale(pPosture->sideAccel, strafe, 8);
|
||||
if (actor->xspr.height)
|
||||
strafe = MulScale(strafe, speed, 16);
|
||||
actor->vel.X += MulScale(strafe, y, 30);
|
||||
actor->vel.Y -= MulScale(strafe, x, 30);
|
||||
actor->__int_vel.X += MulScale(strafe, y, 30);
|
||||
actor->__int_vel.Y -= MulScale(strafe, x, 30);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1656,9 +1656,9 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
switch (pPlayer->posture) {
|
||||
case 1:
|
||||
if (pInput->actions & SB_JUMP)
|
||||
actor->vel.Z -= pPosture->normalJumpZ;//0x5b05;
|
||||
actor->__int_vel.Z -= pPosture->normalJumpZ;//0x5b05;
|
||||
if (pInput->actions & SB_CROUCH)
|
||||
actor->vel.Z += pPosture->normalJumpZ;//0x5b05;
|
||||
actor->__int_vel.Z += pPosture->normalJumpZ;//0x5b05;
|
||||
break;
|
||||
case 2:
|
||||
if (!(pInput->actions & SB_CROUCH))
|
||||
|
@ -1671,8 +1671,8 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
#endif
|
||||
sfxPlay3DSound(actor, 700, 0, 0);
|
||||
|
||||
if (packItemActive(pPlayer, 4)) actor->vel.Z = pPosture->pwupJumpZ; //-0x175555;
|
||||
else actor->vel.Z = pPosture->normalJumpZ; //-0xbaaaa;
|
||||
if (packItemActive(pPlayer, 4)) actor->__int_vel.Z = pPosture->pwupJumpZ; //-0x175555;
|
||||
else actor->__int_vel.Z = pPosture->normalJumpZ; //-0xbaaaa;
|
||||
pPlayer->cantJump = 1;
|
||||
}
|
||||
|
||||
|
@ -1764,9 +1764,9 @@ 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->vel.X = pPlayer->actor->vel.X + MulScale(0x155555, x, 14);
|
||||
spawned->vel.Y = pPlayer->actor->vel.Y + MulScale(0x155555, y, 14);
|
||||
spawned->vel.Z = pPlayer->actor->vel.Z;
|
||||
spawned->__int_vel.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;
|
||||
}
|
||||
pPlayer->hand = 0;
|
||||
}
|
||||
|
@ -1862,15 +1862,15 @@ void playerProcess(PLAYER* pPlayer)
|
|||
}
|
||||
}
|
||||
ProcessInput(pPlayer);
|
||||
int nSpeed = approxDist(actor->vel.X, actor->vel.Y);
|
||||
pPlayer->zViewVel = interpolatedvalue(pPlayer->zViewVel, actor->vel.Z, 0x7000);
|
||||
int nSpeed = approxDist(actor->__int_vel.X, actor->__int_vel.Y);
|
||||
pPlayer->zViewVel = interpolatedvalue(pPlayer->zViewVel, actor->__int_vel.Z, 0x7000);
|
||||
int dz = pPlayer->actor->int_pos().Z - pPosture->eyeAboveZ - pPlayer->zView;
|
||||
if (dz > 0)
|
||||
pPlayer->zViewVel += MulScale(dz << 8, 0xa000, 16);
|
||||
else
|
||||
pPlayer->zViewVel += MulScale(dz << 8, 0x1800, 16);
|
||||
pPlayer->zView += pPlayer->zViewVel >> 8;
|
||||
pPlayer->zWeaponVel = interpolatedvalue(pPlayer->zWeaponVel, actor->vel.Z, 0x5000);
|
||||
pPlayer->zWeaponVel = interpolatedvalue(pPlayer->zWeaponVel, actor->__int_vel.Z, 0x5000);
|
||||
dz = pPlayer->actor->int_pos().Z - pPosture->weaponAboveZ - pPlayer->zWeapon;
|
||||
if (dz > 0)
|
||||
pPlayer->zWeaponVel += MulScale(dz << 8, 0x8000, 16);
|
||||
|
@ -2173,7 +2173,7 @@ int playerDamageSprite(DBloodActor* source, PLAYER* pPlayer, DAMAGE_TYPE nDamage
|
|||
double top, bottom;
|
||||
GetActorExtents(pActor, &top, &bottom);
|
||||
DVector3 gibPos(pActor->spr.pos.XY(), top);
|
||||
CGibVelocity gibVel(pActor->vel.X >> 1, pActor->vel.Y >> 1, -0xccccc);
|
||||
CGibVelocity gibVel(pActor->__int_vel.X >> 1, pActor->__int_vel.Y >> 1, -0xccccc);
|
||||
GibSprite(pActor, GIBTYPE_27, &gibPos, &gibVel);
|
||||
GibSprite(pActor, GIBTYPE_7, NULL, NULL);
|
||||
fxSpawnBlood(pActor, nDamage << 4);
|
||||
|
|
|
@ -348,7 +348,7 @@ void SEQINST::Update()
|
|||
|
||||
|
||||
// by NoOne: add surfaceSound trigger feature
|
||||
if (!VanillaMode() && pSequence->frames[frameIndex].surfaceSound && actor->vel.Z == 0 && actor->vel.X != 0) {
|
||||
if (!VanillaMode() && pSequence->frames[frameIndex].surfaceSound && actor->__int_vel.Z == 0 && actor->__int_vel.X != 0) {
|
||||
|
||||
if (actor->sector()->upperLink) break; // don't play surface sound for stacked sectors
|
||||
int surf = tileGetSurfType(actor->sector()->floorpicnum);
|
||||
|
|
|
@ -92,7 +92,7 @@ void BloodSoundEngine::CalcPosVel(int type, const void* source, const float pt[3
|
|||
auto actor = (DBloodActor*)source;
|
||||
|
||||
// Engine expects velocity in units per second, not units per tic.
|
||||
if (vel) *vel = { actor->vel.X * (30 / 65536.f), actor->vel.Z * (-30 / 65536.f), actor->vel.Y * (-30 / 65536.f) };
|
||||
if (vel) *vel = { actor->__int_vel.X * (30 / 65536.f), actor->__int_vel.Z * (-30 / 65536.f), actor->__int_vel.Y * (-30 / 65536.f) };
|
||||
*pos = GetSoundPos(actor->int_pos());
|
||||
}
|
||||
else if (type == SOURCE_Ambient)
|
||||
|
|
|
@ -274,8 +274,8 @@ void LifeLeechOperate(DBloodActor* actor, EVENT event)
|
|||
if (nDist != 0 && cansee(actor->int_pos().X, actor->int_pos().Y, top, actor->sector(), x, y, z, target->sector()))
|
||||
{
|
||||
int t = DivScale(nDist, 0x1aaaaa, 12);
|
||||
x += (target->vel.X * t) >> 12;
|
||||
y += (target->vel.Y * t) >> 12;
|
||||
x += (target->__int_vel.X * t) >> 12;
|
||||
y += (target->__int_vel.Y * t) >> 12;
|
||||
auto angBak = actor->spr.angle;
|
||||
actor->spr.angle = VecToAngle(x - actor->int_pos().X, y - actor->int_pos().Y);
|
||||
int dx = bcos(actor->int_ang());
|
||||
|
|
|
@ -457,9 +457,9 @@ void UpdateAimVector(PLAYER* pPlayer)
|
|||
if (pWeaponTrack->seeker)
|
||||
{
|
||||
int t = DivScale(nDist, pWeaponTrack->seeker, 12);
|
||||
x2 += (actor->vel.X * t) >> 12;
|
||||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
x2 += (actor->__int_vel.X * t) >> 12;
|
||||
y2 += (actor->__int_vel.Y * t) >> 12;
|
||||
z2 += (actor->__int_vel.Z * t) >> 8;
|
||||
}
|
||||
int lx = x + MulScale(Cos(plActor->int_ang()), nDist, 30);
|
||||
int ly = y + MulScale(Sin(plActor->int_ang()), nDist, 30);
|
||||
|
|
Loading…
Reference in a new issue