- use typedefs for TVector<double> etc.
(Better have this out of the way before messing around with this stuff...)
This commit is contained in:
parent
2e588c2099
commit
f8ebfb541e
23 changed files with 72 additions and 67 deletions
|
|
@ -1728,7 +1728,7 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool preci
|
|||
AActor *target;
|
||||
fixed_t speed;
|
||||
|
||||
speed = !usecurspeed ? actor->Speed : xs_CRoundToInt(TVector3<double>(actor->velx, actor->vely, actor->velz).Length());
|
||||
speed = !usecurspeed ? actor->Speed : xs_CRoundToInt(DVector3(actor->velx, actor->vely, actor->velz).Length());
|
||||
target = actor->tracer;
|
||||
if (target == NULL || !actor->CanSeek(target))
|
||||
{
|
||||
|
|
@ -1787,7 +1787,7 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool preci
|
|||
if (!(actor->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER)))
|
||||
{ // Need to seek vertically
|
||||
fixedvec2 vec = actor->Vec2To(target);
|
||||
double dist = MAX(1.0, TVector2<double>(vec.x, vec.y).Length());
|
||||
double dist = MAX(1.0, DVector2(vec.x, vec.y).Length());
|
||||
// Aim at a player's eyes and at the middle of the actor for everything else.
|
||||
fixed_t aimheight = target->height/2;
|
||||
if (target->IsKindOf(RUNTIME_CLASS(APlayerPawn)))
|
||||
|
|
@ -2139,7 +2139,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
|
|||
//dest->x - source->x
|
||||
fixedvec3 vect = mo->Vec3To(origin);
|
||||
vect.z += origin->height / 2;
|
||||
TVector3<double> velocity(vect.x, vect.y, vect.z);
|
||||
DVector3 velocity(vect.x, vect.y, vect.z);
|
||||
velocity.Resize(speed);
|
||||
mo->velx = (fixed_t)(velocity.X);
|
||||
mo->vely = (fixed_t)(velocity.Y);
|
||||
|
|
@ -5828,7 +5828,7 @@ bool P_CheckMissileSpawn (AActor* th, fixed_t maxdist)
|
|||
if (maxdist > 0)
|
||||
{
|
||||
// move a little forward so an angle can be computed if it immediately explodes
|
||||
TVector3<double> advance(FIXED2DBL(th->velx), FIXED2DBL(th->vely), FIXED2DBL(th->velz));
|
||||
DVector3 advance(FIXED2DBL(th->velx), FIXED2DBL(th->vely), FIXED2DBL(th->velz));
|
||||
double maxsquared = FIXED2DBL(maxdist);
|
||||
maxsquared *= maxsquared;
|
||||
|
||||
|
|
@ -5838,7 +5838,7 @@ bool P_CheckMissileSpawn (AActor* th, fixed_t maxdist)
|
|||
{
|
||||
advance *= 0.5f;
|
||||
}
|
||||
while (TVector2<double>(advance).LengthSquared() >= maxsquared);
|
||||
while (DVector2(advance).LengthSquared() >= maxsquared);
|
||||
th->SetXYZ(
|
||||
th->X() + FLOAT2FIXED(advance.X),
|
||||
th->Y() + FLOAT2FIXED(advance.Y),
|
||||
|
|
@ -6000,7 +6000,7 @@ AActor *P_SpawnMissileXYZ (fixed_t x, fixed_t y, fixed_t z,
|
|||
// Answer: No, because this way, you can set up sets of parallel missiles.
|
||||
|
||||
fixedvec3 fixvel = source->Vec3To(dest);
|
||||
TVector3<double> velocity(fixvel.x, fixvel.y, fixvel.z);
|
||||
DVector3 velocity(fixvel.x, fixvel.y, fixvel.z);
|
||||
// Floor and ceiling huggers should never have a vertical component to their velocity
|
||||
if (th->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER))
|
||||
{
|
||||
|
|
@ -6288,7 +6288,7 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
|
|||
vz = -finesine[pitch>>ANGLETOFINESHIFT];
|
||||
speed = MissileActor->Speed;
|
||||
|
||||
TVector3<double> vec(vx, vy, vz);
|
||||
DVector3 vec(vx, vy, vz);
|
||||
|
||||
if (MissileActor->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue