File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
GeneralsMD/Code/GameEngine/Source/Common/System
Generals/Code/GameEngine/Source/Common/System Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -1511,18 +1511,20 @@ void BuildAssistant::sellObject( Object *obj )
1511
1511
// set the model condition in the drawable for this object that will show the buildup
1512
1512
// scaffold and adjust the model height by construction percent
1513
1513
//
1514
- obj->setModelConditionFlags ( MAKE_MODELCONDITION_MASK2 ( MODELCONDITION_PARTIALLY_CONSTRUCTED,
1515
- MODELCONDITION_ACTIVELY_BEING_CONSTRUCTED) );
1514
+ obj->setModelConditionFlags ( MAKE_MODELCONDITION_MASK2 ( MODELCONDITION_PARTIALLY_CONSTRUCTED, MODELCONDITION_ACTIVELY_BEING_CONSTRUCTED) );
1515
+
1516
+ // TheSuperHackers @bugfix Mauller 27/06/2025 we need to deselect the object before setting it as unselectable
1517
+ // If the object is set unselectable too soon, it fails to be removed from the selection group
1518
+
1519
+ // for everybody, unselect them at this time. You can't just deselect a drawable. Selection is a logic property.
1520
+ TheGameLogic->deselectObject (obj, PLAYERMASK_ALL, TRUE );
1516
1521
1517
1522
//
1518
1523
// set this object as under de-construction (sold). It is still a legal target, since you get the money at
1519
1524
// the completion of sale.
1520
1525
//
1521
1526
obj->setStatus ( MAKE_OBJECT_STATUS_MASK2 ( OBJECT_STATUS_SOLD, OBJECT_STATUS_UNSELECTABLE ) );
1522
1527
1523
- // for everybody, unselect them at this time. You can't just deselect a drawable. Selection is a logic property.
1524
- TheGameLogic->deselectObject (obj, PLAYERMASK_ALL, TRUE );
1525
-
1526
1528
//
1527
1529
// set the animation durations so that the regular build up loop animations can be
1528
1530
// done a bit faster for selling
Original file line number Diff line number Diff line change @@ -1536,18 +1536,20 @@ void BuildAssistant::sellObject( Object *obj )
1536
1536
// set the model condition in the drawable for this object that will show the buildup
1537
1537
// scaffold and adjust the model height by construction percent
1538
1538
//
1539
- obj->setModelConditionFlags ( MAKE_MODELCONDITION_MASK2 ( MODELCONDITION_PARTIALLY_CONSTRUCTED,
1540
- MODELCONDITION_ACTIVELY_BEING_CONSTRUCTED) );
1539
+ obj->setModelConditionFlags ( MAKE_MODELCONDITION_MASK2 ( MODELCONDITION_PARTIALLY_CONSTRUCTED, MODELCONDITION_ACTIVELY_BEING_CONSTRUCTED) );
1540
+
1541
+ // TheSuperHackers @bugfix Mauller 27/06/2025 we need to deselect the object before setting it as unselectable
1542
+ // If the object is set unselectable too soon, it fails to be removed from the selection group
1543
+
1544
+ // for everybody, unselect them at this time. You can't just deselect a drawable. Selection is a logic property.
1545
+ TheGameLogic->deselectObject (obj, PLAYERMASK_ALL, TRUE );
1541
1546
1542
1547
//
1543
1548
// set this object as under de-construction (sold). It is still a legal target, since you get the money at
1544
1549
// the completion of sale.
1545
1550
//
1546
1551
obj->setStatus ( MAKE_OBJECT_STATUS_MASK2 ( OBJECT_STATUS_SOLD, OBJECT_STATUS_UNSELECTABLE ) );
1547
1552
1548
- // for everybody, unselect them at this time. You can't just deselect a drawable. Selection is a logic property.
1549
- TheGameLogic->deselectObject (obj, PLAYERMASK_ALL, TRUE );
1550
-
1551
1553
//
1552
1554
// set the animation durations so that the regular build up loop animations can be
1553
1555
// done a bit faster for selling
You can’t perform that action at this time.
0 commit comments