The State of War Resolution Patch is a critical fix for a well-known bug in the real-time strategy game Command & Conquer: Red Alert 2 and its expansion Yuri's Revenge. Below is a detailed explanation of the issue and the patch:
-
Trigger Conditions:

- A unit (e.g., Chrono Legionnaire, Yuri Clone) enters combat (attacking an enemy).
- The player attempts to use a special ability (e.g., Chrono Legionnaire's Chrono-Shield, Yuri Clone's Clone) while the unit is in combat.
-
Consequence:
- The game crashes to desktop with an error message (e.g., "State of War Resolution Patch" or similar).
- This occurs because the game fails to resolve the unit's state transition from "combat" to "ability use," causing a memory access violation.
Root Cause
- The game's engine mishandles state transitions when a unit in combat (
ATTACKINGstate) is forced to switch to an ability state (e.g.,ABILITY_CASTING). - Critical variables (e.g., unit state flags, ability timers) are not properly reset, leading to undefined behavior.
Patch Solution
The patch fixes the bug by validating unit states before executing abilities and resetting critical variables. Here’s how it works:

Key Fixes:
-
State Validation:
- Checks if a unit is in a valid state (e.g., not
ATTACKING) before allowing an ability. - Example pseudocode:
if (unit->state == ATTACKING) { // Reject ability use to prevent crash return; }
- Checks if a unit is in a valid state (e.g., not
-
Variable Reset:

- Resets internal state flags and timers when transitioning from combat to ability mode.
- Ensures no residual data from the combat state interferes with ability execution.
-
Error Handling:
Gracefully handles invalid states instead of crashing (e.g., logs an error and ignores the ability request).