Skip to content

Commit b8d95a4

Browse files
committed
Improved 'canSnipeVehicle' logic by excluding empty bikes.
1 parent c08e01d commit b8d95a4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

GeneralsMD/Code/GameEngine/Source/Common/RTS/ActionManager.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,6 +1431,13 @@ Bool ActionManager::canSnipeVehicle( const Object *obj, const Object *objectToSn
14311431
return FALSE;
14321432
}
14331433

1434+
// TheSuperHackers @bugfix Caball009 04/09/2025 Disabled bikes may not have a rider to snipe.
1435+
ContainModuleInterface* contain = objectToSnipe->getContain();
1436+
if ( contain && contain->isRiderChangeContain() && contain->getContainedItemsList()->empty() )
1437+
{
1438+
return FALSE;
1439+
}
1440+
14341441
return TRUE;
14351442
}
14361443

0 commit comments

Comments
 (0)