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.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
fix(gameengine): damage large objects reaching into a nuke's outer radius
Olcay Seygan95bdfa5f19cc
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex afea61424..30fddd716 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -286,6 +286,7 @@ found and fixed — EA's own, not port damage.**- A booby trap shot off a building, or sold with it, releases the building. The mark was only ever cleared when the trap went off, so the building stayed marked for the rest of the match and no second trap could be laid.- Something flagged unselectable is unselectable. The flag existed and nothing read it.- A suicide unit pressed up against a building goes off. Touching the building's outline counted as having its view blocked, so it walked away to find a clear line of sight it never needed, came back, and did it again without ever detonating.+- A nuclear missile hurts the whole of a big building. The blast measured to the middle of everything near it, so an airfield whose centre sat just outside the outer ring took nothing while half of it stood in the fire. Distance is now taken halfway between the nearest edge and the centre.- Cancelling an order of Red Guard after the first soldier has walked out no longer refunds the order. One order is two soldiers for one price, and the refund came back whole, so the first one was free.- Double-clicking to grab everything of a kind grabs what a box would, not things you can only click one at a time.- A bounty pays what the percentage says. Rounding up a fraction that was already a whole number paid a dollar extra on every kill.diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cppindex d044f1afa..ff07ede7f 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/NeutronMissileSlowDeathUpdate.cpp@@ -316,12 +316,13 @@ void NeutronMissileSlowDeathBehavior::doBlast( const BlastInfo *blastInfo ){ObjectIterator *iter = ThePartitionManager->iterateObjectsInRange( missilePos,blastInfo->outerRadius,- FROM_CENTER_2D,+ FROM_BOUNDINGSPHERE_3D,NULL );MemoryPoolObjectHolder hold( iter );Object *other;const Coord3D *otherPos;Coord3D forceVector;+ Coord3D edgeToMissile;Real dist;for( other = iter->first(); other; other = iter->next() ){@@ -329,10 +330,16 @@ void NeutronMissileSlowDeathBehavior::doBlast( const BlastInfo *blastInfo )// get other positionotherPos = other->getPosition();- // compute vector from the missile to other object- forceVector.x = otherPos->x - missilePos->x;- forceVector.y = otherPos->y - missilePos->y;- forceVector.z = otherPos->z - missilePos->z;+ //+ // Measured to the centre, a building as big as an airfield whose middle sat outside the+ // outer radius took nothing while half of it was inside the blast. The search now takes+ // anything the radius touches, and the distance is taken halfway between the object's+ // nearest edge and its centre, so a big structure in the fall-off gets a fair share.+ //+ ThePartitionManager->getVectorTo( other, missilePos, FROM_BOUNDINGSPHERE_3D, edgeToMissile );+ forceVector.x = ( (otherPos->x - missilePos->x) - edgeToMissile.x ) * 0.5f;+ forceVector.y = ( (otherPos->y - missilePos->y) - edgeToMissile.y ) * 0.5f;+ forceVector.z = ( (otherPos->z - missilePos->z) - edgeToMissile.z ) * 0.5f;// try to topple other objectother->topple( &forceVector, blastInfo->toppleSpeed, TOPPLE_OPTIONS_NO_BOUNCE |