Remove unused parameters.
This commit is contained in:
committed by
abcdefg30
parent
ea243b8558
commit
0e7ad43425
@@ -302,7 +302,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
if ((sbyte)vFacing < 0)
|
||||
speed = minSpeed;
|
||||
else if (!WillClimbWithinDistance(vFacing, loopRadius, predClfDist, diffClfMslHgt)
|
||||
&& !WillClimbAroundInclineTop(vFacing, loopRadius, predClfDist, diffClfMslHgt, speed))
|
||||
&& !WillClimbAroundInclineTop(vFacing, loopRadius, predClfDist, diffClfMslHgt))
|
||||
{
|
||||
// Find highest speed greater than the above minimum that allows the missile
|
||||
// to surmount the incline
|
||||
@@ -311,7 +311,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
{
|
||||
var lpRds = LoopRadius(spd, info.VerticalRateOfTurn.Facing);
|
||||
return WillClimbWithinDistance(vFac, lpRds, predClfDist, diffClfMslHgt)
|
||||
|| WillClimbAroundInclineTop(vFac, lpRds, predClfDist, diffClfMslHgt, spd);
|
||||
|| WillClimbAroundInclineTop(vFac, lpRds, predClfDist, diffClfMslHgt);
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -401,7 +401,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
// Will missile climb around incline top if bringing vertical facing
|
||||
// down to zero on an arc of radius loopRadius
|
||||
// Calling this function only makes sense when IsNearInclineTop returns true
|
||||
static bool WillClimbAroundInclineTop(int vFacing, int loopRadius, int predClfDist, int diffClfMslHgt, int speed)
|
||||
static bool WillClimbAroundInclineTop(int vFacing, int loopRadius, int predClfDist, int diffClfMslHgt)
|
||||
{
|
||||
// Vector from missile's current position pointing to the loop's center
|
||||
var radius = new WVec(loopRadius, 0, 0)
|
||||
@@ -523,7 +523,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
// Missile will climb around incline top if bringing vertical facing
|
||||
// down to zero on an arc of radius loopRadius
|
||||
else if (IsNearInclineTop(vFacing, loopRadius, predClfDist)
|
||||
&& WillClimbAroundInclineTop(vFacing, loopRadius, predClfDist, diffClfMslHgt, speed))
|
||||
&& WillClimbAroundInclineTop(vFacing, loopRadius, predClfDist, diffClfMslHgt))
|
||||
desiredVFacing = 0;
|
||||
|
||||
// Missile will not climb terrAltDiff w-units within hHeightChange w-units
|
||||
@@ -537,7 +537,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
for (var vFac = System.Math.Min(vFacing + info.VerticalRateOfTurn.Facing - 1, 63); vFac >= vFacing; vFac--)
|
||||
if (!WillClimbWithinDistance(vFac, loopRadius, predClfDist, diffClfMslHgt)
|
||||
&& !(predClfDist <= loopRadius * (1024 - WAngle.FromFacing(vFac).Sin()) / 1024
|
||||
&& WillClimbAroundInclineTop(vFac, loopRadius, predClfDist, diffClfMslHgt, speed)))
|
||||
&& WillClimbAroundInclineTop(vFac, loopRadius, predClfDist, diffClfMslHgt)))
|
||||
{
|
||||
desiredVFacing = vFac + 1;
|
||||
break;
|
||||
@@ -568,7 +568,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
}
|
||||
|
||||
int HomingInnerTick(int predClfDist, int diffClfMslHgt, int relTarHorDist, int lastHtChg, int lastHt,
|
||||
int nxtRelTarHorDist, int relTarHgt, int vFacing, bool targetPassedBy)
|
||||
int relTarHgt, int vFacing, bool targetPassedBy)
|
||||
{
|
||||
int desiredVFacing = vFacing;
|
||||
|
||||
@@ -772,7 +772,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
targetPassedBy = false;
|
||||
|
||||
var desiredVFacing = HomingInnerTick(predClfDist, diffClfMslHgt, relTarHorDist, lastHtChg, lastHt,
|
||||
nxtRelTarHorDist, relTarHgt, vFacing, targetPassedBy);
|
||||
relTarHgt, vFacing, targetPassedBy);
|
||||
|
||||
// The target has been passed by
|
||||
if (tarDistVec.HorizontalLength < speed * WAngle.FromFacing(vFacing).Cos() / 1024)
|
||||
|
||||
Reference in New Issue
Block a user