File tree Expand file tree Collapse file tree
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,8 +159,8 @@ ObjectID CountermeasuresBehavior::calculateCountermeasureToDivertTo( const Objec
159159 Real closestFlareDist = 1e15f;
160160 Object *closestFlare = nullptr ;
161161
162- const int volleySize = data->m_volleySize ;
163- int volleyFlaresCounted = 0 ;
162+ const UnsignedInt volleySize = max ( data->m_volleySize , 1u ) ;
163+ UnsignedInt volleyFlaresCounted = 0 ;
164164
165165 // Flares are pushed to the front of the list, but we only want to acquire the "newest" of the flares, therefore
166166 // Start at the end of the list and go towards the beginning.
@@ -182,9 +182,13 @@ ObjectID CountermeasuresBehavior::calculateCountermeasureToDivertTo( const Objec
182182 // The non retail behaviour corrects the code to iterate through all flares in the volley
183183 break ;
184184#else
185- volleyFlaresCounted++ ;
185+ ++volleyFlaresCounted ;
186186#endif
187187 }
188+
189+ #if RETAIL_COMPATIBLE_CRC
190+ ++volleyFlaresCounted;
191+ #endif
188192 }
189193
190194 if ( closestFlare )
You can’t perform that action at this time.
0 commit comments