- several fixes.
This commit is contained in:
parent
29a7fe33f3
commit
b140d71c49
26 changed files with 97 additions and 83 deletions
|
|
@ -323,7 +323,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FreezeDeathChunks)
|
|||
self->player = NULL;
|
||||
head->ObtainInventory (self);
|
||||
}
|
||||
head->Angles.Pitch = 0;
|
||||
head->Angles.Pitch = 0.;
|
||||
head->RenderStyle = self->RenderStyle;
|
||||
head->alpha = self->alpha;
|
||||
if (head->player->camera == self)
|
||||
|
|
|
|||
|
|
@ -78,12 +78,12 @@ void ASecurityCamera::PostBeginPlay ()
|
|||
if (args[2])
|
||||
Delta = 360. / (args[2] * TICRATE / 8);
|
||||
else
|
||||
Delta = 0;
|
||||
Delta = 0.;
|
||||
if (args[1])
|
||||
Delta /= 2;
|
||||
Acc = 0;
|
||||
Angles.Pitch = clamp<int>((signed int)((signed char)args[0]), -89, 89);
|
||||
Range = args[1];
|
||||
Acc = 0.;
|
||||
Angles.Pitch = (double)clamp<int>((signed char)args[0], -89, 89);
|
||||
Range = (double)args[1];
|
||||
}
|
||||
|
||||
void ASecurityCamera::Tick ()
|
||||
|
|
@ -133,7 +133,7 @@ void AAimingCamera::PostBeginPlay ()
|
|||
|
||||
args[2] = 0;
|
||||
Super::PostBeginPlay ();
|
||||
MaxPitchChange = changepitch / TICRATE;
|
||||
MaxPitchChange = double(changepitch / TICRATE);
|
||||
Range /= TICRATE;
|
||||
|
||||
TActorIterator<AActor> iterator (args[3]);
|
||||
|
|
@ -177,8 +177,7 @@ void AAimingCamera::Tick ()
|
|||
DVector2 vect(fv3.x, fv3.y);
|
||||
double dz = Z() - tracer->Z() - tracer->height/2;
|
||||
double dist = vect.Length();
|
||||
double ang = dist != 0.f ? g_atan2 (dz, dist) : 0;
|
||||
DAngle desiredPitch = ToDegrees(ang);
|
||||
DAngle desiredPitch = dist != 0.f ? vectoyaw(dist, dz) : 0.;
|
||||
DAngle diff = deltaangle(Angles.Pitch, desiredPitch);
|
||||
if (fabs (diff) < MaxPitchChange)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ void AInterpolationPoint::FormChain ()
|
|||
if (Next == NULL && (args[3] | args[4]))
|
||||
Printf ("Can't find target for camera node %d\n", tid);
|
||||
|
||||
Angles.Pitch = clamp<int>((signed char)args[0], -89, 89);
|
||||
Angles.Pitch = (double)clamp<int>((signed char)args[0], -89, 89);
|
||||
|
||||
if (Next != NULL)
|
||||
Next->FormChain ();
|
||||
|
|
@ -422,7 +422,7 @@ bool APathFollower::Interpolate ()
|
|||
}
|
||||
if (args[2] & 2)
|
||||
{ // adjust yaw
|
||||
Angles.Yaw = vectoyaw(DVector2(dx, dy));
|
||||
Angles.Yaw = vectoyaw(dx, dy);
|
||||
}
|
||||
if (args[2] & 4)
|
||||
{ // adjust pitch; use floats for precision
|
||||
|
|
@ -430,8 +430,7 @@ bool APathFollower::Interpolate ()
|
|||
double fdy = FIXED2DBL(dy);
|
||||
double fdz = FIXED2DBL(-dz);
|
||||
double dist = g_sqrt (fdx*fdx + fdy*fdy);
|
||||
double ang = dist != 0.f ? g_atan2 (fdz, dist) : 0;
|
||||
Angles.Pitch = ToDegrees(ang);
|
||||
Angles.Pitch = dist != 0.f ? vectoyaw(dist, fdz) : 0.;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -642,8 +641,7 @@ bool AMovingCamera::Interpolate ()
|
|||
double dy = FIXED2DBL(Y() - tracer->Y());
|
||||
double dz = FIXED2DBL(Z() - tracer->Z() - tracer->height/2);
|
||||
double dist = g_sqrt (dx*dx + dy*dy);
|
||||
double ang = dist != 0.f ? g_atan2 (dz, dist) : 0;
|
||||
Angles.Pitch = ToDegrees(ang);
|
||||
Angles.Pitch = dist != 0.f ? vectoyaw(dist, dz) : 0.;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue