Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

fix(gameengine): straight tank shells, barrel-led lobs, one-curve missiles

Olcay Seygan0002f6aad868
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69bf25d79..269e89309 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -89,6 +89,9 @@ found and fixed — EA's own, not port damage.**
- The Gattling cannon on an Overlord's back turns at the Gattling Tank's 180 degrees a second instead of 60 and opens fire the same way. A target appearing behind the Overlord is under fire 22 frames sooner and took 66 hits where it took 41.
- A replay recorded before this change plays back differently.
- Tell a tank to fire at the ground and it fires from where it stands. On any slope the game read the spot as hidden behind the very hill it was lying on, so a tank with the spot well inside its range drove off looking for a better angle, swinging its hull round under its own turret, and fired on the way. Pulled off a building to shell the ground 140 behind them, a Battlemaster took 84 frames to its first shell on the new spot and now takes 45, which is how long its turret needs to come round, and a pair of Scorpions that used to wander about 200 away over eight seconds now stay where they were put. Replays recorded before this play back differently.
+- Tank shells fly straight at the target. EA's shell climbed ten over the highest ground on the way and dropped back down, so once the shells glowed, every Crusader shot looked like a lob: it left the barrel 12 degrees high, rose 7 over the line and hit coming down at 25 degrees. Now it flies the line, rising off it by nothing, and only a hill between the tank and its target still lifts it over. This goes for every tank cannon, the Battlemaster, Overlord, Scorpion and Marauder too.
+- Artillery shells leave along the barrel. A Nuke Cannon's shell used to come out six and a half degrees under its raised barrel and jerk onto its arc; it now leaves the muzzle at the barrel's angle and the arc grows from there. Inferno and Nuke Cannon shells still lob as high as they did.
+- A SCUD or a Tomahawk flies one smooth curve to its target. A SCUD went straight up, flipped over the top at six degrees a frame, glided flat for a moment and then kinked again into its dive. Now it rolls over and comes down in a single sweep that only ever eases off, its sharpest turn 4.6 degrees a frame. The Scud Storm takes the same curve and lands within half a second of when it did. Replays recorded before this play back differently.
## Point defense lasers back on the planes, in clips on the tanks
diff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
index f2f15f72c..b2b811cd8 100644
--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini
+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
@@ -1519,3 +1519,106 @@ Object Boss_VehicleSupplyTruck
End
End
End
+
+; ---- tank shells fly the line ---------------------------------------------------------------------
+;
+; EA's cannon shell flies a curve ten over the highest ground between the tank and its victim: on
+; flat ground a Crusader's shell left twelve degrees above the barrel, climbed seven over the line
+; and came down on the target at twenty five, so every shot read as a lob.
+; StraightWhenClear flies the line instead when no ground rises into it, and the old curve is left
+; for a shot over a hill. Each block below is EA's DumbProjectileBehavior with that line added.
+
+Object GenericTankShell
+ ReplaceModule ModuleTag_04
+ Behavior = DumbProjectileBehavior ModuleTag_04_Reforged
+ FirstHeight = 10
+ SecondHeight = 10
+ FirstPercentIndent = 50%
+ SecondPercentIndent = 90%
+ FlightPathAdjustDistPerSecond = 100
+ StraightWhenClear = Yes
+ End
+ End
+End
+
+Object BattleMasterTankShell
+ ReplaceModule ModuleTag_04
+ Behavior = DumbProjectileBehavior ModuleTag_04_Reforged
+ FirstHeight = 10
+ SecondHeight = 10
+ FirstPercentIndent = 50%
+ SecondPercentIndent = 90%
+ FlightPathAdjustDistPerSecond = 100
+ StraightWhenClear = Yes
+ End
+ End
+End
+
+Object OverlordTankShell
+ ReplaceModule ModuleTag_04
+ Behavior = DumbProjectileBehavior ModuleTag_04_Reforged
+ FirstHeight = 10
+ SecondHeight = 10
+ FirstPercentIndent = 50%
+ SecondPercentIndent = 90%
+ FlightPathAdjustDistPerSecond = 100
+ StraightWhenClear = Yes
+ End
+ End
+End
+
+Object ScorpionTankShell
+ ReplaceModule ModuleTag_06
+ Behavior = DumbProjectileBehavior ModuleTag_06_Reforged
+ DetonateCallsKill = Yes
+ FirstHeight = 10
+ SecondHeight = 10
+ FirstPercentIndent = 50%
+ SecondPercentIndent = 90%
+ FlightPathAdjustDistPerSecond = 100
+ StraightWhenClear = Yes
+ End
+ End
+End
+
+Object MarauderTankShell
+ ReplaceModule ModuleTag_06
+ Behavior = DumbProjectileBehavior ModuleTag_06_Reforged
+ DetonateCallsKill = Yes
+ FirstHeight = 10
+ SecondHeight = 10
+ FirstPercentIndent = 50%
+ SecondPercentIndent = 90%
+ FlightPathAdjustDistPerSecond = 100
+ StraightWhenClear = Yes
+ End
+ End
+End
+
+Object Nuke_BattleMasterTankShell
+ ReplaceModule ModuleTag_04
+ Behavior = DumbProjectileBehavior ModuleTag_04_Reforged
+ DetonateCallsKill = Yes
+ FirstHeight = 10
+ SecondHeight = 10
+ FirstPercentIndent = 50%
+ SecondPercentIndent = 90%
+ FlightPathAdjustDistPerSecond = 100
+ StraightWhenClear = Yes
+ End
+ End
+End
+
+Object Nuke_OverlordTankShell
+ ReplaceModule ModuleTag_04
+ Behavior = DumbProjectileBehavior ModuleTag_04_Reforged
+ DetonateCallsKill = Yes
+ FirstHeight = 10
+ SecondHeight = 10
+ FirstPercentIndent = 50%
+ SecondPercentIndent = 90%
+ FlightPathAdjustDistPerSecond = 100
+ StraightWhenClear = Yes
+ End
+ End
+End
diff --git a/GeneralsMD/Code/Data/Scenarios/shellpaths.txt b/GeneralsMD/Code/Data/Scenarios/shellpaths.txt
new file mode 100644
index 000000000..527f2a735
--- /dev/null
+++ b/GeneralsMD/Code/Data/Scenarios/shellpaths.txt
@@ -0,0 +1,35 @@
+# Projectile flight paths, one launcher per lane, each shooting an unarmed target: tank shell
+# (Crusader), lobbed shells (Inferno Cannon, Nuke Cannon) and missiles (Scud Launcher, Tomahawk,
+# Rocket Buggy). The paths are only in the log with a temporary per-frame trace of each projectile's
+# position and nose, a DEBUG_LOG in DumbProjectileBehavior::update and MissileAIUpdate::update.
+#
+# generals.exe -headless -quickstart -noshellmap -observer -multiInstance -noFPSLimit
+# -randommap 1 2 small -autoskirmish 2 -takeover
+# -side 0 FactionAmerica -side 1 FactionGLA -seed 1 -maxframes 600
+# -scenario shellpaths -logPrefix shellpaths_
+#
+# Sharpest nose turn in one frame, before and after straight tank shells, barrel-led lobs and the
+# cruise missiles' single curve (2026-10-13): tank shell 13.7 to 1.9 and 7.2 to 0 over the line, Nuke
+# Cannon 6.5 to 3.8, Inferno 5.4 to 5.5, Scud 6.0 to 4.6, Tomahawk 6.0 to 5.5, Rocket Buggy 3.3 both.
+#
+# See mobstress.txt for the line grammar.
+
+30 spawn 0 AmericaTankCrusader 1 500 500
+30 spawn 1 AmericaVehicleDozer 1 630 500
+30 spawn 0 ChinaVehicleInfernoCannon 1 560 650
+30 spawn 1 ChinaVehicleDozer 1 810 650
+30 spawn 0 ChinaVehicleNukeLauncher 1 500 800
+30 spawn 1 GLAVehicleDozer 1 780 800
+30 spawn 0 GLAVehicleScudLauncher 1 500 950
+30 spawn 1 ChinaVehicleSupplyTruck 1 800 950
+30 spawn 0 AmericaVehicleTomahawk 1 500 1100
+30 spawn 1 ChinaVehicleTroopCrawlerEmpty 1 800 1100
+30 spawn 0 GLAVehicleRocketBuggy 1 500 1250
+30 spawn 1 ChinaVehicleListeningOutpost 1 700 1250
+
+60 attack 0 AmericaTankCrusader 1 AmericaVehicleDozer
+60 attack 0 ChinaVehicleInfernoCannon 1 ChinaVehicleDozer
+60 attack 0 ChinaVehicleNukeLauncher 1 GLAVehicleDozer
+60 attack 0 GLAVehicleScudLauncher 1 ChinaVehicleSupplyTruck
+60 attack 0 AmericaVehicleTomahawk 1 ChinaVehicleTroopCrawlerEmpty
+60 attack 0 GLAVehicleRocketBuggy 1 ChinaVehicleListeningOutpost
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h
index 41962ab95..9c243a74b 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h
@@ -360,13 +360,6 @@ public:
*/
inline void setUsePreciseZPos(Bool u) { setFlag(PRECISE_Z_POS, u); }
- /**
- above zero, a thrust locomotor with a preferred height stops holding that height this far from its
- goal (measured flat) and comes down along a quarter sine from whatever height it has: level where
- the descent starts, steepest where it arrives. Missiles set it from DistanceToTargetBeforeDiving.
- */
- inline void setSineDescentDistance(Real dist) { m_sineDescentDistance = dist; }
-
/**
when off (the default), units slow down as they approach their target.
@@ -497,7 +490,7 @@ private:
UnsignedInt m_flags;
Real m_preferredHeight;
Real m_preferredHeightDamping;
- Real m_sineDescentDistance;
+ Real m_sineDescentDistance; ///< no longer read; kept so saves keep their layout
Real m_angleOffset;
Real m_offsetIncrement;
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DumbProjectileBehavior.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DumbProjectileBehavior.h
index 95839ae61..c0e3db213 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DumbProjectileBehavior.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DumbProjectileBehavior.h
@@ -57,6 +57,7 @@ public:
Real m_secondHeight; ///< And the second, this.
Real m_firstPercentIndent; ///< The first point will be this percent along the target line
Real m_secondPercentIndent; ///< And the second, this.
+ Bool m_straightWhenClear; ///< Fly the straight line instead when no terrain rises into it (direct-fire shells)
UnsignedInt m_maxLifespan;
Bool m_tumbleRandomly;
Bool m_orientToFlightPath;
@@ -114,6 +115,7 @@ private:
Coord3D m_flightPathStart; ///< where flight path started (in case we must regen it)
Coord3D m_flightPathEnd; ///< where flight path ends (in case we must regen it)
Real m_flightPathSpeed; ///< flight path speed (in case we must regen it)
+ Real m_launchSlope; ///< rise over run of the barrel at launch, 0 for a level or lowered barrel
Int m_flightPathSegments; ///< number of segments in the flightpath (in case we must regen it)
Int m_currentFlightPathStep; ///< Our current index in the flight path vector. Quicker than popping off.
WeaponBonusConditionFlags m_extraBonusFlags;
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MissileAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MissileAIUpdate.h
index 4fbc5fbf0..3a5fcbcb0 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MissileAIUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MissileAIUpdate.h
@@ -53,7 +53,7 @@ public:
UnsignedInt m_ignitionDelay; ///< delay in frames from when missile is 'fired', to when it starts moving 15
Real m_initialVel;
Real m_initialDist;
- Real m_diveDistance; ///< If I get this close to my target, start ignoring my preferred height
+ Real m_diveDistance; ///< parsed and unused: a cruise missile flies one curve to its goal (Locomotor::moveTowardsPositionThrust)
const FXList* m_ignitionFX; ///< FXList to do when missile 'ignites'
Bool m_useWeaponSpeed; ///< if true, limit speed of projectile to the Weapon's info
Bool m_detonateOnNoFuel; ///< If true, don't just stop thrusting, blow up when out of gas
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp
index 59d220904..5050e96bb 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp
@@ -71,7 +71,8 @@ DumbProjectileBehaviorModuleData::DumbProjectileBehaviorModuleData() :
m_firstHeight(0.0f),
m_secondHeight(0.0f),
m_firstPercentIndent(0.0f),
- m_secondPercentIndent(0.0f),
+ m_secondPercentIndent(0.0f),
+ m_straightWhenClear(FALSE),
m_garrisonHitKillCount(0),
m_garrisonHitKillFX(NULL),
m_flightPathAdjustDistPerFrame(0.0f)
@@ -94,6 +95,7 @@ void DumbProjectileBehaviorModuleData::buildFieldParse(MultiIniFieldParse& p)
{ "SecondHeight", INI::parseReal, NULL, offsetof( DumbProjectileBehaviorModuleData, m_secondHeight ) },
{ "FirstPercentIndent", INI::parsePercentToReal, NULL, offsetof( DumbProjectileBehaviorModuleData, m_firstPercentIndent ) },
{ "SecondPercentIndent", INI::parsePercentToReal, NULL, offsetof( DumbProjectileBehaviorModuleData, m_secondPercentIndent ) },
+ { "StraightWhenClear", INI::parseBool, NULL, offsetof( DumbProjectileBehaviorModuleData, m_straightWhenClear ) },
{ "GarrisonHitKillRequiredKindOf", KindOfMaskType::parseFromINI, NULL, offsetof( DumbProjectileBehaviorModuleData, m_garrisonHitKillKindof ) },
{ "GarrisonHitKillForbiddenKindOf", KindOfMaskType::parseFromINI, NULL, offsetof( DumbProjectileBehaviorModuleData, m_garrisonHitKillKindofNot ) },
@@ -123,6 +125,7 @@ DumbProjectileBehavior::DumbProjectileBehavior( Thing *thing, const ModuleData*
m_flightPath.clear();
m_flightPathSegments = 0;
m_flightPathSpeed = 0;
+ m_launchSlope = 0;
m_flightPathStart.zero();
m_flightPathEnd.zero();
m_currentFlightPathStep = 0;
@@ -401,6 +404,11 @@ void DumbProjectileBehavior::projectileFireAtObjectOrPosition( const Object *vic
m_flightPathStart = *getObject()->getPosition();
m_flightPathEnd = victimPosToUse;
+
+ // the shell sits on the barrel here, pointing where the barrel points
+ Vector3 barrel = getObject()->getTransformMatrix()->Get_X_Vector();
+ Real barrelRun = sqrtf(sqr(barrel.X) + sqr(barrel.Y));
+ m_launchSlope = (barrel.Z > 0.0f && barrelRun > 0.0f) ? barrel.Z / barrelRun : 0.0f;
if (!calcFlightPath(true))
{
//Can only fail if wildly incorrect points
@@ -451,6 +459,23 @@ Bool DumbProjectileBehavior::calcFlightPath(Bool recalcNumSegments)
controlPoints[1].z = highestInterveningTerrain + d->m_firstHeight;
controlPoints[2].z = highestInterveningTerrain + d->m_secondHeight;
+ if( d->m_straightWhenClear && ThePartitionManager->isClearLineOfSightTerrain( NULL, controlPoints[0], NULL, controlPoints[3] ) )
+ {
+ // A cannon shell flies the line to its victim. The arc above was ten over the highest ground on the
+ // way, so on flat ground a Crusader's shell climbed twelve degrees off the barrel and came down on
+ // the target at twenty five; with the glowing trail on it, every shot read as a lob. Only a hill
+ // in the way still lifts it.
+ controlPoints[1].z = controlPoints[0].z + targetVector.Z * targetDistance * d->m_firstPercentIndent;
+ controlPoints[2].z = controlPoints[0].z + targetVector.Z * targetDistance * d->m_secondPercentIndent;
+ }
+ else if( m_launchSlope > 0.0f && d->m_orientToFlightPath && !d->m_tumbleRandomly )
+ {
+ // A lobbed shell leaves along its raised barrel. The first control point sets the curve's first
+ // direction, and over the highest ground it pointed off the barrel: a Nuke Cannon's shell left
+ // six and a half degrees under its 39 degree barrel and jinked at the muzzle.
+ controlPoints[1].z = controlPoints[0].z + m_launchSlope * sqrtf( sqr(firstPointAlongLine.X) + sqr(firstPointAlongLine.Y) );
+ }
+
// With four control points, we have a curve. We will decide how many frames we want to take to get to the target,
// and fill our vector with those curve points.
BezierSegment flightCurve( controlPoints );
@@ -748,7 +773,8 @@ void DumbProjectileBehavior::xfer( Xfer *xfer )
// version 3 adds the launcher's weapon bonus flags, lost on load so a shell in flight detonated
// without veterancy or horde bonus, and the detonated flag, so a DetonateCallsKill shell cannot
// go off a second time
- XferVersion currentVersion = 3;
+ // version 4 adds the barrel's slope at launch, which a lobbed shell's path starts along
+ XferVersion currentVersion = 4;
XferVersion version = currentVersion;
xfer->xferVersion( &version, currentVersion );
@@ -808,6 +834,9 @@ void DumbProjectileBehavior::xfer( Xfer *xfer )
xfer->xferBool( &m_hasDetonated );
}
+ if( version >= 4 )
+ xfer->xferReal( &m_launchSlope );
+
// the path itself is a vector of points that is not saved; rebuild it from the start, end and
// segment count that are, so the step we just read means something
if( xfer->getXferMode() == XFER_LOAD && m_flightPathSegments > 0 )
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp
index dd53dd940..a8e08a59e 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp
@@ -93,7 +93,13 @@ static const Real INFANTRY_STOP_FRAMES = 3.0f; // a soldier stops from top sp
LocomotorStore *TheLocomotorStore = NULL; ///< the Locomotor store definition
const Real BIGNUM = 99999.0f;
-const Real SINE_DESCENT_LOOKAHEAD_FRAMES = 4.0f;
+const Real ARC_LOOKAHEAD_FRAMES = 4.0f;
+const Real ARC_ARRIVE_RUN = 0.5f; // cos 60: a cruise missile's curve arrives in a sixty degree dive
+const Real ARC_ARRIVE_DROP = 0.8660254f; // sin 60
+// handles as a share of the distance left: the long leaving one spreads the turn over the top of the
+// arc, so a Scud's sharpest turn fell from 6.0 to 4.6 degrees a frame against 5.7 with even thirds
+const Real ARC_LEAVE_HANDLE = 0.6f;
+const Real ARC_ARRIVE_HANDLE = 0.3f;
const Real INTERCEPT_EPSILON = 0.0001f;
static const char *TheLocomotorPriorityNames[] =
@@ -2726,21 +2732,30 @@ void Locomotor::moveTowardsPositionThrust(Object* obj, PhysicsBehavior *physics,
//out of the handleBehaviorZ() function
Coord3D pos = *obj->getPosition();
Real distToGoal2D = sqrt(sqr(goalPos.x - pos.x) + sqr(goalPos.y - pos.y));
- if( m_preferredHeight != 0.0f && !getFlag(PRECISE_Z_POS) && distToGoal2D < m_sineDescentDistance )
- {
- // Come down along height(d) = h * sin(PI/2 * d / descentDist), aiming a few frames ahead on the one
- // such curve that passes through the missile now. A Scud is still near the top of its climb here,
- // about 230 over the goal against a cruise height of 120, so the curve starts from where it is.
- // Aiming at the goal itself instead was a straight dive with a kink where it began.
- Real lookAhead = SINE_DESCENT_LOOKAHEAD_FRAMES * physics->getVelocityMagnitude();
- if (distToGoal2D > lookAhead)
+ if( m_preferredHeight != 0.0f && !getFlag(PRECISE_Z_POS) && obj->isKindOf(KINDOF_PROJECTILE) )
+ {
+ // A cruise missile flies one smooth curve from where it is, leaving along the way it is going and
+ // arriving in a sixty degree dive, aiming a few frames ahead on it. The curve is drawn again every
+ // frame from the missile's own heading, so it never asks for a sudden turn. Climbing to the cruise
+ // height, holding it and diving off it turned a Scud over the top of its climb at six degrees a
+ // frame for twenty frames, stopped dead in a flat glide and kinked again into the dive, and a
+ // Tomahawk levelled out and dived the same way. On the curve the turn only eases off.
+ Real speed = physics->getVelocityMagnitude();
+ Real lookAhead = ARC_LOOKAHEAD_FRAMES * speed;
+ Real dist = sqrt(sqr(goalPos.x - pos.x) + sqr(goalPos.y - pos.y) + sqr(goalPos.z - pos.z));
+ if (dist > lookAhead && distToGoal2D > 0.001f && speed > 0.001f)
{
- Real aimDist = distToGoal2D - lookAhead;
- Real aimFraction = aimDist / distToGoal2D;
- Real heightNow = pos.z - goalPos.z;
- localGoalPos.x = goalPos.x + (pos.x - goalPos.x) * aimFraction;
- localGoalPos.y = goalPos.y + (pos.y - goalPos.y) * aimFraction;
- localGoalPos.z = goalPos.z + heightNow * Sin(PI / 2 * aimDist / m_sineDescentDistance) / Sin(PI / 2 * distToGoal2D / m_sineDescentDistance);
+ const Coord3D *vel = physics->getVelocity();
+ Coord3D leave, arrive;
+ leave.set(vel->x / speed, vel->y / speed, vel->z / speed);
+ arrive.set(ARC_ARRIVE_RUN * (goalPos.x - pos.x) / distToGoal2D, ARC_ARRIVE_RUN * (goalPos.y - pos.y) / distToGoal2D, -ARC_ARRIVE_DROP);
+ Real hLeave = dist * ARC_LEAVE_HANDLE, hArrive = dist * ARC_ARRIVE_HANDLE;
+ Real t = lookAhead / dist;
+ Real u = 1.0f - t;
+ Real b0 = u * u * u, b1 = 3.0f * u * u * t, b2 = 3.0f * u * t * t, b3 = t * t * t;
+ localGoalPos.x = b0 * pos.x + b1 * (pos.x + leave.x * hLeave) + b2 * (goalPos.x - arrive.x * hArrive) + b3 * goalPos.x;
+ localGoalPos.y = b0 * pos.y + b1 * (pos.y + leave.y * hLeave) + b2 * (goalPos.y - arrive.y * hArrive) + b3 * goalPos.y;
+ localGoalPos.z = b0 * pos.z + b1 * (pos.z + leave.z * hLeave) + b2 * (goalPos.z - arrive.z * hArrive) + b3 * goalPos.z;
}
}
else if( m_preferredHeight != 0.0f && !getFlag(PRECISE_Z_POS) )
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp
index c8e3f9e0a..e3ca9e491 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp
@@ -602,10 +602,6 @@ void MissileAIUpdate::doAttackState(Bool turnOK)
}
}
- // a missile with a cruise height leaves it this far from the goal along a quarter sine
- if (curLoco)
- curLoco->setSineDescentDistance(d->m_diveDistance);
-
if (m_noTurnDistLeft <= 0.0f)
{
switchToState(ATTACK);