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): bring a bomber down after its run too

Olcay Seygan23baeb327456
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9754f5bd..580c06b35 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -157,7 +157,7 @@ found and fixed — EA's own, not port damage.**
- Engineers can clear mines and booby traps they cannot see.
- A helicopter no longer boards a transport from the air.
- A jet shot down in the air flies on before it falls. Its wings stopped working on the frame it was hit, so it dropped almost vertically and hit the ground under the spot it was killed at, which is the one thing a plane doing three hundred knots cannot do. It keeps its lift now and gives it up over the next second or so, carrying forward and nosing over as it goes.
-- And the bombers come down at all. A B-52, a Spectre gunship, a cargo plane and an A-10 all left the falling speed out of their data, and nought means the lift exactly cancels gravity: shot down, they flew on at cruising height, burning, and blew up in the air still level. Every one of them now falls at half gravity or better, and the fireball waits for the ground instead of going off on a timer somewhere over the map. Measured on the way in: a B-52 falls for 2.8 seconds and lands, where it used to detonate at a hundred feet.
+- And the bombers come down at all. A B-52, a Spectre gunship, a cargo plane and an A-10 all left the falling speed out of their data, and nought means the lift exactly cancels gravity: shot down, they flew on at cruising height, burning, and blew up in the air still level. Every one of them now falls at half gravity or better, and the fireball waits for the ground instead of going off on a timer somewhere over the map. Measured on the way in: a B-52 falls for 2.8 seconds and lands, where it used to detonate at a hundred feet. On the way home it still did not: after the drop a bomber flies off the map on a precise course that is allowed three times its normal lift, which held a dead one up with lift to spare. A bomber shot down after its run now comes down like one shot down before it.
## The same game on both screens, and after loading
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/JetSlowDeathBehavior.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/JetSlowDeathBehavior.cpp
index 54e2dc400..d878694f1 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/JetSlowDeathBehavior.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/JetSlowDeathBehavior.cpp
@@ -279,6 +279,13 @@ UpdateSleepTime JetSlowDeathBehavior::update( void )
const Real fallingLift = -TheGlobalData->m_gravity * (1.0f - fallFraction);
const Real currentLift = locomotor->getMaxLift( us->getBodyModule()->getDamageState() );
locomotor->setMaxLift( currentLift + (fallingLift - currentLift) * LIFT_BLEED_PER_FRAME );
+
+ /* Ultra-accurate flying may take three times the lift, which is still more than gravity,
+ and a delivery plane flies it all the way off the map once its load is down; a jet on
+ final approach does too. Shot down on the way home, a B-52 burned and blew apart at
+ cruising height. Its AI keeps running while it falls and can switch the mode back on,
+ so it goes off every frame. */
+ locomotor->setUltraAccurate( FALSE );
}
/* And the explosion waits for the ground. The base class destroys the object on a timer