Skip to content

Commit 58a39bd

Browse files
author
Bart Roossien
committed
[GEN][ZH] Prevents group force attack exploit when adding a building group to a unit selection
1 parent d83fca1 commit 58a39bd

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,13 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
11411141
{
11421142
VecObjectPtr objlist = selectedSquad->getLiveObjects();
11431143
Int numObjs = objlist.size();
1144+
1145+
// TheSuperHackers @fix skyaero 22/07/2025 check to prevent group force attack exploit
1146+
if (numObjs > 0 && objlist[0]->getDrawable()->isKindOf(KINDOF_STRUCTURE))
1147+
{
1148+
TheInGameUI->deselectAllDrawables();
1149+
}
1150+
11441151
for (Int i = 0; i < numObjs; ++i)
11451152
{
11461153
TheInGameUI->selectDrawable(objlist[i]->getDrawable());

GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,13 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
12161216
{
12171217
VecObjectPtr objlist = selectedSquad->getLiveObjects();
12181218
Int numObjs = objlist.size();
1219+
1220+
// TheSuperHackers @fix skyaero 22/07/2025 check to prevent group force attack exploit
1221+
if (numObjs > 0 && objlist[0]->getDrawable()->isKindOf(KINDOF_STRUCTURE))
1222+
{
1223+
TheInGameUI->deselectAllDrawables();
1224+
}
1225+
12191226
for (Int i = 0; i < numObjs; ++i)
12201227
{
12211228
TheInGameUI->selectDrawable(objlist[i]->getDrawable());

0 commit comments

Comments
 (0)