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 @@ -1506,18 +1506,20 @@ void BuildAssistant::sellObject( Object *obj )
1506
1506
// set the model condition in the drawable for this object that will show the buildup
1507
1507
// scaffold and adjust the model height by construction percent
1508
1508
//
1509
- obj->setModelConditionFlags ( MAKE_MODELCONDITION_MASK2 ( MODELCONDITION_PARTIALLY_CONSTRUCTED,
1510
- MODELCONDITION_ACTIVELY_BEING_CONSTRUCTED) );
1509
+ obj->setModelConditionFlags ( MAKE_MODELCONDITION_MASK2 ( MODELCONDITION_PARTIALLY_CONSTRUCTED, MODELCONDITION_ACTIVELY_BEING_CONSTRUCTED) );
1510
+
1511
+ // TheSuperHackers @bugfix Mauller 27/06/2025 we need to deselect the object before setting it as unselectable
1512
+ // If the object is set unselectable too soon, it fails to be removed from the selection group
1513
+
1514
+ // for everybody, unselect them at this time. You can't just deselect a drawable. Selection is a logic property.
1515
+ TheGameLogic->deselectObject (obj, PLAYERMASK_ALL, TRUE );
1511
1516
1512
1517
//
1513
1518
// set this object as under de-construction (sold). It is still a legal target, since you get the money at
1514
1519
// the completion of sale.
1515
1520
//
1516
1521
obj->setStatus ( MAKE_OBJECT_STATUS_MASK2 ( OBJECT_STATUS_SOLD, OBJECT_STATUS_UNSELECTABLE ) );
1517
1522
1518
- // for everybody, unselect them at this time. You can't just deselect a drawable. Selection is a logic property.
1519
- TheGameLogic->deselectObject (obj, PLAYERMASK_ALL, TRUE );
1520
-
1521
1523
//
1522
1524
// set the animation durations so that the regular build up loop animations can be
1523
1525
// done a bit faster for selling
Original file line number Diff line number Diff line change @@ -1531,18 +1531,20 @@ void BuildAssistant::sellObject( Object *obj )
1531
1531
// set the model condition in the drawable for this object that will show the buildup
1532
1532
// scaffold and adjust the model height by construction percent
1533
1533
//
1534
- obj->setModelConditionFlags ( MAKE_MODELCONDITION_MASK2 ( MODELCONDITION_PARTIALLY_CONSTRUCTED,
1535
- MODELCONDITION_ACTIVELY_BEING_CONSTRUCTED) );
1534
+ obj->setModelConditionFlags ( MAKE_MODELCONDITION_MASK2 ( MODELCONDITION_PARTIALLY_CONSTRUCTED, MODELCONDITION_ACTIVELY_BEING_CONSTRUCTED) );
1535
+
1536
+ // TheSuperHackers @bugfix Mauller 27/06/2025 we need to deselect the object before setting it as unselectable
1537
+ // If the object is set unselectable too soon, it fails to be removed from the selection group
1538
+
1539
+ // for everybody, unselect them at this time. You can't just deselect a drawable. Selection is a logic property.
1540
+ TheGameLogic->deselectObject (obj, PLAYERMASK_ALL, TRUE );
1536
1541
1537
1542
//
1538
1543
// set this object as under de-construction (sold). It is still a legal target, since you get the money at
1539
1544
// the completion of sale.
1540
1545
//
1541
1546
obj->setStatus ( MAKE_OBJECT_STATUS_MASK2 ( OBJECT_STATUS_SOLD, OBJECT_STATUS_UNSELECTABLE ) );
1542
1547
1543
- // for everybody, unselect them at this time. You can't just deselect a drawable. Selection is a logic property.
1544
- TheGameLogic->deselectObject (obj, PLAYERMASK_ALL, TRUE );
1545
-
1546
1548
//
1547
1549
// set the animation durations so that the regular build up loop animations can be
1548
1550
// done a bit faster for selling
You can’t perform that action at this time.
0 commit comments